diff options
| author | Petr Hosek <phosek@chromium.org> | 2018-07-24 07:06:17 +0000 |
|---|---|---|
| committer | Petr Hosek <phosek@chromium.org> | 2018-07-24 07:06:17 +0000 |
| commit | 058c04c3ddecb4ecc81655c91b7aa0e7a5ef0ab1 (patch) | |
| tree | ac0600b9fb4cae07ea394f8ba887f71e64d168fc /libcxx/lib/CMakeLists.txt | |
| parent | 935710a66c231f27ae0fbdfda24dad86947be749 (diff) | |
| download | bcm5719-llvm-058c04c3ddecb4ecc81655c91b7aa0e7a5ef0ab1.tar.gz bcm5719-llvm-058c04c3ddecb4ecc81655c91b7aa0e7a5ef0ab1.zip | |
Reland "[CMake] Support statically linking dependencies only to shared or static library"
This is a reland of commit r337668.
llvm-svn: 337814
Diffstat (limited to 'libcxx/lib/CMakeLists.txt')
| -rw-r--r-- | libcxx/lib/CMakeLists.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libcxx/lib/CMakeLists.txt b/libcxx/lib/CMakeLists.txt index d32f8fb8e86..5ac691a75ed 100644 --- a/libcxx/lib/CMakeLists.txt +++ b/libcxx/lib/CMakeLists.txt @@ -44,7 +44,7 @@ if (APPLE AND (LIBCXX_CXX_ABI_LIBNAME STREQUAL "libcxxabi" OR set(LIBCXX_OSX_REEXPORT_SYSTEM_ABI_LIBRARY ON) endif() -if (LIBCXX_ENABLE_STATIC_ABI_LIBRARY) +if (LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY) add_library_flags("-Wl,--whole-archive" "-Wl,-Bstatic") add_library_flags("${LIBCXX_CXX_ABI_LIBRARY}") add_library_flags("-Wl,-Bdynamic" "-Wl,--no-whole-archive") @@ -259,14 +259,14 @@ if (LIBCXX_ENABLE_STATIC) list(APPEND LIBCXX_TARGETS "cxx_static") # Attempt to merge the libc++.a archive and the ABI library archive into one. - if (LIBCXX_ENABLE_STATIC_ABI_LIBRARY) + if (LIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY) set(MERGE_ARCHIVES_SEARCH_PATHS "") 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} MATCHES "cxxabi(_static|_shared)?" AND HAVE_LIBCXXABI)) - set(MERGE_ARCHIVES_ABI_TARGET "$<TARGET_LINKER_FILE:${LIBCXX_CXX_ABI_LIBRARY}>") + set(MERGE_ARCHIVES_ABI_TARGET "$<TARGET_LINKER_FILE:cxxabi_static>") else() set(MERGE_ARCHIVES_ABI_TARGET "${CMAKE_STATIC_LIBRARY_PREFIX}${LIBCXX_CXX_ABI_LIBRARY}${CMAKE_STATIC_LIBRARY_SUFFIX}") |

