diff options
author | Vitaly Buka <vitalybuka@google.com> | 2019-07-08 17:46:23 +0000 |
---|---|---|
committer | Vitaly Buka <vitalybuka@google.com> | 2019-07-08 17:46:23 +0000 |
commit | 9132b5b287372d8fcb304016ae9ea4bd717151b5 (patch) | |
tree | 8c39c2504afaded82df59e53a25fddaf23073299 | |
parent | 0a371878f145b5ad8c50ea1067e1d26e6befb022 (diff) |
Revert "[libc++] Take 2: Do not cleverly link against libc++abi just because it happens to be there"
r365326 still breaks bots:
http://lab.llvm.org:8011/builders/netbsd-amd64/builds/20712/steps/ninja%20build%20local/logs/stdio
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-autoconf/builds/39477/steps/test%20tsan%20in%20debug%20compiler-rt%20build/logs/stdio
And probably others
This reverts commit 945b9ec0693390ef35fe8c6b774495312246b8b6.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@365359 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | CMakeLists.txt | 13 | ||||
-rw-r--r-- | cmake/Modules/HandleLibCXXABI.cmake | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c1e3abdd..4a7d94549 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -149,9 +149,22 @@ set_property(CACHE LIBCXX_CXX_ABI PROPERTY STRINGS ;${CXXABIS}) # Setup the default options if LIBCXX_CXX_ABI is not specified. if (LIBCXX_CXX_ABI STREQUAL "default") + find_path( + LIBCXX_LIBCXXABI_INCLUDES_INTERNAL cxxabi.h + PATHS ${LLVM_MAIN_SRC_DIR}/projects/libcxxabi/include + ${LLVM_MAIN_SRC_DIR}/runtimes/libcxxabi/include + ${LLVM_MAIN_SRC_DIR}/../libcxxabi/include + NO_DEFAULT_PATH + NO_CMAKE_FIND_ROOT_PATH + ) if (LIBCXX_TARGETING_MSVC) # FIXME: Figure out how to configure the ABI library on Windows. set(LIBCXX_CXX_ABI_LIBNAME "vcruntime") + elseif ((NOT LIBCXX_STANDALONE_BUILD OR HAVE_LIBCXXABI) AND + IS_DIRECTORY "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}") + set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi") + set(LIBCXX_CXX_ABI_INCLUDE_PATHS "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}") + set(LIBCXX_CXX_ABI_INTREE 1) elseif (APPLE) set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi") set(LIBCXX_CXX_ABI_SYSTEM 1) diff --git a/cmake/Modules/HandleLibCXXABI.cmake b/cmake/Modules/HandleLibCXXABI.cmake index 57f9e32c5..10f100f7f 100644 --- a/cmake/Modules/HandleLibCXXABI.cmake +++ b/cmake/Modules/HandleLibCXXABI.cmake @@ -98,7 +98,7 @@ if ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libstdc++" OR "${_LIBSUPCXX_LIBNAME}" "${_LIBSUPCXX_LIBNAME}" "${_LIBSUPCXX_INCLUDE_FILES}" "bits" ) elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libcxxabi") - if (TARGET cxxabi_shared AND TARGET cxxabi_static) + if (LIBCXX_CXX_ABI_INTREE) # Link against just-built "cxxabi" target. set(CXXABI_SHARED_LIBNAME cxxabi_shared) set(CXXABI_STATIC_LIBNAME cxxabi_static) |