[PATCH] D28391: [CMake][libcxx] Do not rely on the existence of c++abi or unwind targets
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 10 17:07:09 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL291632: [CMake][libcxx] Do not rely on the existence of c++abi or unwind targets (authored by phosek).
Changed prior to commit:
https://reviews.llvm.org/D28391?vs=83331&id=83899#toc
Repository:
rL LLVM
https://reviews.llvm.org/D28391
Files:
libcxx/trunk/CMakeLists.txt
libcxx/trunk/lib/CMakeLists.txt
Index: libcxx/trunk/lib/CMakeLists.txt
===================================================================
--- libcxx/trunk/lib/CMakeLists.txt
+++ libcxx/trunk/lib/CMakeLists.txt
@@ -229,7 +229,8 @@
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
@@ -300,7 +301,9 @@
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}")
Index: libcxx/trunk/CMakeLists.txt
===================================================================
--- libcxx/trunk/CMakeLists.txt
+++ libcxx/trunk/CMakeLists.txt
@@ -119,8 +119,7 @@
${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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28391.83899.patch
Type: text/x-patch
Size: 1764 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170111/f348e6a6/attachment.bin>
More information about the llvm-commits
mailing list