[libcxx-commits] [PATCH] D71894: [libcxxabi] Allow tests to link with static libc++abi/libc++ even if the shared version is present
Sergej Jaskiewicz via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jan 30 02:15:01 PST 2020
broadwaylamb updated this revision to Diff 241373.
broadwaylamb added a comment.
Set LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX to ON if LIBCXX_ENABLE_SHARED is not defined
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71894/new/
https://reviews.llvm.org/D71894
Files:
libcxxabi/CMakeLists.txt
Index: libcxxabi/CMakeLists.txt
===================================================================
--- libcxxabi/CMakeLists.txt
+++ libcxxabi/CMakeLists.txt
@@ -96,9 +96,17 @@
"Whether the libc++abi tests should link with the shared libc++abi library"
${LIBCXXABI_ENABLE_SHARED})
+if(DEFINED LIBCXX_ENABLE_SHARED)
+ set(_default_LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX ${LIBCXX_ENABLE_SHARED})
+else()
+ set(_default_LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX ON)
+endif()
+
option(LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX
"Whether the libc++abi tests should link with the shared libc++ library"
- ${LIBCXX_ENABLE_SHARED})
+ ${_default_LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX})
+
+unset(_default_LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX)
cmake_dependent_option(LIBCXXABI_INSTALL_STATIC_LIBRARY
"Install the static libc++abi library." ON
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71894.241373.patch
Type: text/x-patch
Size: 880 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200130/953337ca/attachment.bin>
More information about the libcxx-commits
mailing list