[libcxx] r291727 - Revert "[CMake][libcxx] Do not rely on the existence of c++abi or unwind targets"

Petr Hosek via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 11 15:56:31 PST 2017


Author: phosek
Date: Wed Jan 11 17:56:31 2017
New Revision: 291727

URL: http://llvm.org/viewvc/llvm-project?rev=291727&view=rev
Log:
Revert "[CMake][libcxx] Do not rely on the existence of c++abi or unwind targets"

This reverts commit 94fc5a96f58071703d81d14690094dcd266a5e17.

Modified:
    libcxx/trunk/CMakeLists.txt
    libcxx/trunk/lib/CMakeLists.txt

Modified: libcxx/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/CMakeLists.txt?rev=291727&r1=291726&r2=291727&view=diff
==============================================================================
--- libcxx/trunk/CMakeLists.txt (original)
+++ libcxx/trunk/CMakeLists.txt Wed Jan 11 17:56:31 2017
@@ -119,7 +119,8 @@ if (LIBCXX_CXX_ABI STREQUAL "default")
           ${LLVM_MAIN_SRC_DIR}/runtimes/libcxxabi/include
     NO_DEFAULT_PATH
   )
-  if (IS_DIRECTORY "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}")
+  if (NOT DEFINED LIBCXX_STANDALONE_BUILD 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)

Modified: libcxx/trunk/lib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/lib/CMakeLists.txt?rev=291727&r1=291726&r2=291727&view=diff
==============================================================================
--- libcxx/trunk/lib/CMakeLists.txt (original)
+++ libcxx/trunk/lib/CMakeLists.txt Wed Jan 11 17:56:31 2017
@@ -229,8 +229,7 @@ if (LIBCXX_ENABLE_STATIC)
     if (LIBCXX_CXX_ABI_LIBRARY_PATH)
       set(MERGE_ARCHIVES_SEARCH_PATHS "-L${LIBCXX_CXX_ABI_LIBRARY_PATH}")
     endif()
-    if ((TARGET ${LIBCXX_CXX_ABI_LIBRARY}) OR
-        (${LIBCXX_CXX_ABI_LIBRARY} STREQUAL "cxxabi(_static|_shared)?" AND HAVE_LIBCXXABI))
+    if (TARGET ${LIBCXX_CXX_ABI_LIBRARY})
       set(MERGE_ARCHIVES_ABI_TARGET "$<TARGET_LINKER_FILE:${LIBCXX_CXX_ABI_LIBRARY}>")
     else()
       set(MERGE_ARCHIVES_ABI_TARGET
@@ -301,9 +300,7 @@ if (LIBCXX_ENABLE_SHARED AND LIBCXX_ENAB
   set(LIBCXX_INTERFACE_LIBRARY_NAMES)
   foreach(lib ${LIBCXX_INTERFACE_LIBRARIES})
     # FIXME: Handle cxxabi_static and unwind_static.
-    if (TARGET ${lib} OR
-        (${lib} MATCHES "cxxabi(_static|_shared)?" AND HAVE_LIBCXXABI) OR
-        (${lib} MATCHES "unwind(_static|_shared)?" AND HAVE_LIBUNWIND))
+    if (TARGET ${lib})
       list(APPEND LIBCXX_INTERFACE_LIBRARY_NAMES "$<TARGET_PROPERTY:${lib},OUTPUT_NAME>")
     else()
       list(APPEND LIBCXX_INTERFACE_LIBRARY_NAMES "${lib}")




More information about the cfe-commits mailing list