diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt --- a/compiler-rt/CMakeLists.txt +++ b/compiler-rt/CMakeLists.txt @@ -534,11 +534,10 @@ if(COMPILER_RT_USE_LLVM_UNWINDER) if (COMPILER_RT_ENABLE_STATIC_UNWINDER) - set(unwinder_target unwind_static) + list(APPEND SANITIZER_CXX_ABI_LIBRARIES "$") else() - set(unwinder_target unwind_shared) + list(APPEND SANITIZER_CXX_ABI_LIBRARIES "$,unwind_shared,unwind_static>>") endif() - list(APPEND SANITIZER_CXX_ABI_LIBRARIES "$<$:$>") endif() if (COMPILER_RT_CXX_LIBRARY STREQUAL "libcxx") @@ -546,13 +545,12 @@ append_list_if(COMPILER_RT_HAS_NOSTDINCXX_FLAG -nostdinc++ COMPILER_RT_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_NOSTDLIBXX_FLAG -nostdlib++ COMPILER_RT_COMMON_LINK_FLAGS) # Use the in-tree libc++ through explicit include and library paths. + set(COMPILER_RT_CXX_CFLAGS "$<$:-isystem$,$-isystem>>") if (COMPILER_RT_STATIC_CXX_LIBRARY) - set(cxx_target cxx_static) + set(COMPILER_RT_CXX_LINK_LIBS "$") else() - set(cxx_target cxx_shared) + set(COMPILER_RT_CXX_LINK_LIBS "$,cxx_shared,cxx_static>>") endif() - list(APPEND COMPILER_RT_CXX_CFLAGS "$<$:-isystem$,$-isystem>>") - list(APPEND COMPILER_RT_CXX_LINK_LIBS "$<$:$>") elseif (COMPILER_RT_CXX_LIBRARY STREQUAL "none") # We aren't using any C++ standard library so avoid including the default one. append_list_if(COMPILER_RT_HAS_NOSTDINCXX_FLAG -nostdinc++ COMPILER_RT_COMMON_CFLAGS) @@ -589,13 +587,12 @@ if (SANITIZER_TEST_CXX_LIBNAME STREQUAL "libc++") if (SANITIZER_TEST_CXX_INTREE) + list(APPEND SANITIZER_TEST_CXX_CFLAGS "$<$:-isystem$,$-isystem>>") if (SANITIZER_USE_STATIC_TEST_CXX) - set(cxx_target cxx_static) + list(APPEND SANITIZER_TEST_CXX_LIBRARIES "$") else() - set(cxx_target cxx_shared) + list(APPEND SANITIZER_TEST_CXX_LIBRARIES "$,cxx_shared,cxx_static>>") endif() - list(APPEND SANITIZER_TEST_CXX_LIBRARIES "$<$:$>") - list(APPEND SANITIZER_TEST_CXX_CFLAGS "$<$:-isystem$,$-isystem>>") # We are using the in tree libc++ so avoid including the default one. append_list_if(COMPILER_RT_HAS_NOSTDINCXX_FLAG -nostdinc++ COMPILER_RT_UNITTEST_CFLAGS) append_list_if(COMPILER_RT_HAS_NOSTDLIBXX_FLAG -nostdlib++ COMPILER_RT_UNITTEST_LINK_FLAGS)