summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2016-07-15 00:49:42 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2016-07-15 00:49:42 +0000
commitf0a26203e7ce856ccf7c12c2c1c9d13e5c3ad939 (patch)
treeedf440ad25d43ee69b47bf6c9fc8c7345e5869df /cmake
parent5328c6b635a145efc1204ad25341706fb705e346 (diff)
libc++abi: add a top level option for using CompilerRT
Add an option to opt into compiler-rt instead of libgcc. This option defaults to OFF to avoid a behaviour change. It is not possible to mix and match different runtime libraries. Disabling this requires that libc++ is built accordingly. This knob is particularly useful for targets that are GCC by default (i.e. Linux). git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@275505 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/config-ix.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index 1d40b2a..baed2db 100644
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -42,6 +42,8 @@ check_cxx_compiler_flag(/GR- LIBCXXABI_HAS_NO_GR_FLAG)
check_library_exists(c fopen "" LIBCXXABI_HAS_C_LIB)
check_library_exists(dl dladdr "" LIBCXXABI_HAS_DL_LIB)
check_library_exists(pthread pthread_once "" LIBCXXABI_HAS_PTHREAD_LIB)
-check_library_exists(gcc_s __gcc_personality_v0 "" LIBCXXABI_HAS_GCC_S_LIB)
+if (NOT LIBCXXABI_USE_COMPILER_RT)
+ check_library_exists(gcc_s __gcc_personality_v0 "" LIBCXXABI_HAS_GCC_S_LIB)
+endif ()
check_library_exists(c __cxa_thread_atexit_impl ""
LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL)