[compiler-rt] r202353 - Move COMPILER_RT_HAS_FUNC check from r202303 to config-ix.cmake

Alexey Samsonov samsonov at google.com
Wed Feb 26 22:52:41 PST 2014


Author: samsonov
Date: Thu Feb 27 00:52:41 2014
New Revision: 202353

URL: http://llvm.org/viewvc/llvm-project?rev=202353&view=rev
Log:
Move COMPILER_RT_HAS_FUNC check from r202303 to config-ix.cmake

Modified:
    compiler-rt/trunk/CMakeLists.txt
    compiler-rt/trunk/cmake/config-ix.cmake

Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=202353&r1=202352&r2=202353&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Thu Feb 27 00:52:41 2014
@@ -238,9 +238,8 @@ if(COMPILER_RT_ENABLE_WERROR)
 endif()
 
 # Emulate C99 and C++11's __func__ for MSVC prior to 2013 CTP.
-CHECK_SYMBOL_EXISTS(__func__ "" COMPILER_RT_HAS_FUNC)
-if(NOT COMPILER_RT_HAS_FUNC)
-  list(APPEND SANITIZER_COMMON_CFLAGS -D__func__=__FUNCTION__)
+if(NOT COMPILER_RT_HAS_FUNC_SYMBOL)
+  add_definitions(__func__=__FUNCTION__)
 endif()
 
 # Provide some common commmandline flags for Sanitizer runtimes.

Modified: compiler-rt/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=202353&r1=202352&r2=202353&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake (original)
+++ compiler-rt/trunk/cmake/config-ix.cmake Thu Feb 27 00:52:41 2014
@@ -1,4 +1,5 @@
 include(CheckCXXCompilerFlag)
+include(CheckSymbolExists)
 
 # CodeGen options.
 check_cxx_compiler_flag(-fPIC                COMPILER_RT_HAS_FPIC_FLAG)
@@ -34,3 +35,6 @@ check_cxx_compiler_flag("-Werror -Wno-va
 
 check_cxx_compiler_flag(/WX COMPILER_RT_HAS_WX_FLAG)
 check_cxx_compiler_flag(/wd4722 COMPILER_RT_HAS_WD4722_FLAG)
+
+# Symbols.
+check_symbol_exists(__func__ "" COMPILER_RT_HAS_FUNC_SYMBOL)





More information about the llvm-commits mailing list