summaryrefslogtreecommitdiff
path: root/cmake/config-ix.cmake
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2017-07-26 06:46:11 +0000
committerPetr Hosek <phosek@chromium.org>2017-07-26 06:46:11 +0000
commit99ae2fab3b53a1f0c17e17b2b045b488b52ae08a (patch)
tree20b2a16e43fa115de983c96de866333ba046da53 /cmake/config-ix.cmake
parent8e31fff29bcbd5148e222e11130671bfe46de849 (diff)
Revert "[sanitizer] Support compiler-rt builtins"
This reverts commit fd63314d6770e0da62572a3fea2c41c4cc0fc58a. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309083 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/config-ix.cmake')
-rw-r--r--cmake/config-ix.cmake22
1 files changed, 1 insertions, 21 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index 64c1347c6..c329c6a97 100644
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -1,5 +1,4 @@
include(CMakePushCheckState)
-include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)
include(CheckLibraryExists)
include(CheckSymbolExists)
@@ -12,26 +11,6 @@ function(check_linker_flag flag out_var)
cmake_pop_check_state()
endfunction()
-check_library_exists(c fopen "" COMPILER_RT_HAS_LIBC)
-if (NOT SANITIZER_USE_COMPILER_RT)
- check_library_exists(gcc_s __gcc_personality_v0 "" COMPILER_RT_HAS_GCC_S_LIB)
-endif()
-
-check_c_compiler_flag(-nodefaultlibs COMPILER_RT_HAS_NODEFAULTLIBS_FLAG)
-if (COMPILER_RT_HAS_NODEFAULTLIBS_FLAG)
- set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -nodefaultlibs")
- if (COMPILER_RT_HAS_LIBC)
- list(APPEND CMAKE_REQUIRED_LIBRARIES c)
- endif ()
- if (SANITIZER_USE_COMPILER_RT)
- list(APPEND CMAKE_REQUIRED_FLAGS -rtlib=compiler-rt)
- find_compiler_rt_library(builtins COMPILER_RT_BUILTINS_LIBRARY)
- list(APPEND CMAKE_REQUIRED_LIBRARIES "${COMPILER_RT_BUILTINS_LIBRARY}")
- elseif (COMPILER_RT_HAS_GCC_S_LIB)
- list(APPEND CMAKE_REQUIRED_LIBRARIES gcc_s)
- endif ()
-endif ()
-
# CodeGen options.
check_cxx_compiler_flag(-fPIC COMPILER_RT_HAS_FPIC_FLAG)
check_cxx_compiler_flag(-fPIE COMPILER_RT_HAS_FPIE_FLAG)
@@ -94,6 +73,7 @@ check_cxx_compiler_flag(/wd4800 COMPILER_RT_HAS_WD4800_FLAG)
check_symbol_exists(__func__ "" COMPILER_RT_HAS_FUNC_SYMBOL)
# Libraries.
+check_library_exists(c fopen "" COMPILER_RT_HAS_LIBC)
check_library_exists(dl dlopen "" COMPILER_RT_HAS_LIBDL)
check_library_exists(rt shm_open "" COMPILER_RT_HAS_LIBRT)
check_library_exists(m pow "" COMPILER_RT_HAS_LIBM)