Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -107,7 +107,7 @@ # Build libc++abi with libunwind. We need this option to determine whether to # link with libunwind or libgcc_s while running the test cases. -option(LIBCXXABI_USE_LLVM_UNWINDER "Build and use the LLVM unwinder." OFF) +option(LIBCXX_USE_LLVM_UNWINDER "Build and use the LLVM unwinder." OFF) # Target options -------------------------------------------------------------- option(LIBCXX_BUILD_32_BITS "Build 32 bit libc++." ${LLVM_BUILD_32_BITS}) Index: cmake/config-ix.cmake =================================================================== --- cmake/config-ix.cmake +++ cmake/config-ix.cmake @@ -17,4 +17,6 @@ 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) -check_library_exists(gcc_s __gcc_personality_v0 "" LIBCXX_HAS_GCC_S_LIB) +if (NOT LIBCXX_USE_LLVM_UNWINDER) + check_library_exists(gcc_s __gcc_personality_v0 "" LIBCXX_HAS_GCC_S_LIB) +endif() Index: lib/CMakeLists.txt =================================================================== --- lib/CMakeLists.txt +++ lib/CMakeLists.txt @@ -80,6 +80,7 @@ add_library_flags_if(LIBCXX_HAS_RT_LIB rt) add_library_flags_if(LIBCXX_HAS_GCC_S_LIB gcc_s) add_library_flags_if(LIBCXX_HAS_ATOMIC_LIB atomic) +add_library_flags_if(LIBCXX_USE_LLVM_UNWINDER unwind) # Setup flags. add_flags_if_supported(-fPIC)