Index: lib/CMakeLists.txt =================================================================== --- lib/CMakeLists.txt +++ lib/CMakeLists.txt @@ -72,9 +72,14 @@ add_library_flags_if(LIBCXX_HAS_C_LIB c) add_library_flags_if(LIBCXX_HAS_M_LIB m) 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_HAVE_CXX_ATOMICS_WITH_LIB atomic) +if (LIBCXXABI_USE_LLVM_UNWINDER) + add_library_flags(unwind) +else() + add_library_flags_if(LIBCXX_HAS_GCC_S_LIB gcc_s) +endif() + # Setup flags. if (NOT WIN32) add_flags_if_supported(-fPIC)