[libcxx] r292085 - Reland "[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
Sun Jan 15 16:33:10 PST 2017
Author: phosek
Date: Sun Jan 15 18:33:09 2017
New Revision: 292085
URL: http://llvm.org/viewvc/llvm-project?rev=292085&view=rev
Log:
Reland "[CMake][libcxx] Do not rely on the existence of c++abi or unwind targets"
This relands commit r291727.
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=292085&r1=292084&r2=292085&view=diff
==============================================================================
--- libcxx/trunk/CMakeLists.txt (original)
+++ libcxx/trunk/CMakeLists.txt Sun Jan 15 18:33:09 2017
@@ -125,8 +125,7 @@ if (LIBCXX_CXX_ABI STREQUAL "default")
${LLVM_MAIN_SRC_DIR}/runtimes/libcxxabi/include
NO_DEFAULT_PATH
)
- if (NOT DEFINED LIBCXX_STANDALONE_BUILD AND
- IS_DIRECTORY "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}")
+ if (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=292085&r1=292084&r2=292085&view=diff
==============================================================================
--- libcxx/trunk/lib/CMakeLists.txt (original)
+++ libcxx/trunk/lib/CMakeLists.txt Sun Jan 15 18:33:09 2017
@@ -247,7 +247,8 @@ 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})
+ if ((TARGET ${LIBCXX_CXX_ABI_LIBRARY}) OR
+ (${LIBCXX_CXX_ABI_LIBRARY} STREQUAL "cxxabi(_static|_shared)?" AND HAVE_LIBCXXABI))
set(MERGE_ARCHIVES_ABI_TARGET "$<TARGET_LINKER_FILE:${LIBCXX_CXX_ABI_LIBRARY}>")
else()
set(MERGE_ARCHIVES_ABI_TARGET
@@ -318,7 +319,9 @@ 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})
+ if (TARGET ${lib} OR
+ (${lib} MATCHES "cxxabi(_static|_shared)?" AND HAVE_LIBCXXABI) OR
+ (${lib} MATCHES "unwind(_static|_shared)?" AND HAVE_LIBUNWIND))
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