Move COMPILER_RT_HAS_FUNC check from r202303 to config-ix.cmake

llvm-svn: 202353
This commit is contained in:
Alexey Samsonov 2014-02-27 06:52:41 +00:00
parent 5441c18824
commit e3e2a11ad9
2 changed files with 6 additions and 3 deletions

View File

@ -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.

View File

@ -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-variadic-macros" COMPILER_RT_HAS_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)