darling-libcxx/cmake/config-ix.cmake
Saleem Abdulrasool e146f7559d libc++: add an option to build against compiler-rt
This mirrors the option in libc++abi to build without libgcc.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@279606 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-24 04:22:52 +00:00

23 lines
899 B
CMake

include(CheckLibraryExists)
include(CheckCXXCompilerFlag)
include(CheckLibcxxAtomic)
# Check compiler flags
check_cxx_compiler_flag(/WX LIBCXX_HAS_WX_FLAG)
check_cxx_compiler_flag(/WX- LIBCXX_HAS_NO_WX_FLAG)
check_cxx_compiler_flag(/EHsc LIBCXX_HAS_EHSC_FLAG)
check_cxx_compiler_flag(/EHs- LIBCXX_HAS_NO_EHS_FLAG)
check_cxx_compiler_flag(/EHa- LIBCXX_HAS_NO_EHA_FLAG)
check_cxx_compiler_flag(/GR- LIBCXX_HAS_NO_GR_FLAG)
# Check libraries
check_library_exists(pthread pthread_create "" LIBCXX_HAS_PTHREAD_LIB)
check_library_exists(c fopen "" LIBCXX_HAS_C_LIB)
check_library_exists(m ccos "" LIBCXX_HAS_M_LIB)
check_library_exists(rt clock_gettime "" LIBCXX_HAS_RT_LIB)
if (NOT LIBCXX_USE_COMPILER_RT)
check_library_exists(gcc_s __gcc_personality_v0 "" LIBCXX_HAS_GCC_S_LIB)
endif()