summaryrefslogtreecommitdiffstats
path: root/libcxx/cmake
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2018-07-23 04:19:55 +0000
committerPetr Hosek <phosek@chromium.org>2018-07-23 04:19:55 +0000
commit7a0295cbc89cc85e93c5fad321d3e33f0cda4d06 (patch)
treee33c3e9167ade9d1c316b74358b7ec6ef948bff5 /libcxx/cmake
parent0477b40137c24d7469f590cc9911f3902f46e688 (diff)
downloadbcm5719-llvm-7a0295cbc89cc85e93c5fad321d3e33f0cda4d06.tar.gz
bcm5719-llvm-7a0295cbc89cc85e93c5fad321d3e33f0cda4d06.zip
[CMake] Support statically linking dependencies only to shared or static library
Currently it's possible to select whether to statically link unwinder or the C++ ABI library, but this option applies to both the shared and static library. However, in some scenarios it may be desirable to only statically link unwinder and C++ ABI library into static C++ library since for shared C++ library we can rely on dynamic linking and linker scripts. This change enables selectively enabling or disabling statically linking only to shared or static library. Differential Revision: https://reviews.llvm.org/D49502 llvm-svn: 337668
Diffstat (limited to 'libcxx/cmake')
-rw-r--r--libcxx/cmake/Modules/HandleLibCXXABI.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/libcxx/cmake/Modules/HandleLibCXXABI.cmake b/libcxx/cmake/Modules/HandleLibCXXABI.cmake
index 0eb70a739d5..d837c3c3758 100644
--- a/libcxx/cmake/Modules/HandleLibCXXABI.cmake
+++ b/libcxx/cmake/Modules/HandleLibCXXABI.cmake
@@ -96,10 +96,10 @@ if ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libstdc++" OR
elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libcxxabi")
if (LIBCXX_CXX_ABI_INTREE)
# Link against just-built "cxxabi" target.
- if (LIBCXX_ENABLE_STATIC_ABI_LIBRARY)
- set(CXXABI_LIBNAME cxxabi_static)
+ if (LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY)
+ set(CXXABI_LIBNAME cxxabi_static)
else()
- set(CXXABI_LIBNAME cxxabi_shared)
+ set(CXXABI_LIBNAME cxxabi_shared)
endif()
set(LIBCXX_LIBCPPABI_VERSION "2" PARENT_SCOPE)
else()
OpenPOWER on IntegriCloud