[PATCH] D71894: [libcxxabi] Allow tests to link with static libc++abi/libc++ even if the shared version is present
Sergej Jaskiewicz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 12 07:03:23 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG43252c1b17b9: [libcxxabi] Set LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX to ON if… (authored by broadwaylamb).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71894/new/
https://reviews.llvm.org/D71894
Files:
libcxxabi/CMakeLists.txt
libcxxabi/test/CMakeLists.txt
Index: libcxxabi/test/CMakeLists.txt
===================================================================
--- libcxxabi/test/CMakeLists.txt
+++ libcxxabi/test/CMakeLists.txt
@@ -11,6 +11,32 @@
set(LIBCXX_ENABLE_SHARED ON)
endif()
+option(LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXABI
+ "Whether the libc++abi tests should link with the shared libc++abi library"
+ ${LIBCXXABI_ENABLE_SHARED})
+
+option(LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX
+ "Whether the libc++abi tests should link with the shared libc++ library"
+ ${LIBCXX_ENABLE_SHARED})
+
+if(LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXABI AND NOT LIBCXXABI_ENABLE_SHARED)
+ message(FATAL_ERROR "LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXABI being ON requires LIBCXXABI_ENABLE_SHARED to be ON")
+endif()
+
+if(NOT LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXABI AND NOT LIBCXXABI_ENABLE_STATIC)
+ message(FATAL_ERROR "LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXABI being OFF requires LIBCXXABI_ENABLE_STATIC to be ON")
+endif()
+
+if(LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX AND NOT LIBCXX_ENABLE_SHARED)
+ message(FATAL_ERROR "LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX being ON requires LIBCXX_ENABLE_SHARED to be ON")
+endif()
+
+if(DEFINED LIBCXX_ENABLE_STATIC
+ AND NOT LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX
+ AND NOT LIBCXX_ENABLE_STATIC)
+ message(FATAL_ERROR "LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX being OFF requires LIBCXX_ENABLE_STATIC to be ON")
+endif()
+
pythonize_bool(LIBCXXABI_BUILD_32_BITS)
pythonize_bool(LIBCXX_ENABLE_SHARED)
pythonize_bool(LIBCXXABI_ENABLE_SHARED)
Index: libcxxabi/CMakeLists.txt
===================================================================
--- libcxxabi/CMakeLists.txt
+++ libcxxabi/CMakeLists.txt
@@ -92,14 +92,6 @@
option(LIBCXXABI_ENABLE_SHARED "Build libc++abi as a shared library." ON)
option(LIBCXXABI_ENABLE_STATIC "Build libc++abi as a static library." ON)
-option(LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXABI
- "Whether the libc++abi tests should link with the shared libc++abi library"
- ${LIBCXXABI_ENABLE_SHARED})
-
-option(LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX
- "Whether the libc++abi tests should link with the shared libc++ library"
- ${LIBCXX_ENABLE_SHARED})
-
cmake_dependent_option(LIBCXXABI_INSTALL_STATIC_LIBRARY
"Install the static libc++abi library." ON
"LIBCXXABI_ENABLE_STATIC;LIBCXXABI_INSTALL_LIBRARY" OFF)
@@ -123,26 +115,6 @@
message(FATAL_ERROR "libc++abi must be built as either a shared or static library.")
endif()
-if(LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXABI AND NOT LIBCXXABI_ENABLE_SHARED)
- message(FATAL_ERROR "LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXABI being ON requires LIBCXXABI_ENABLE_SHARED to be ON")
-endif()
-
-if(NOT LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXABI AND NOT LIBCXXABI_ENABLE_STATIC)
- message(FATAL_ERROR "LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXABI being OFF requires LIBCXXABI_ENABLE_STATIC to be ON")
-endif()
-
-if(DEFINED LIBCXX_ENABLE_SHARED
- AND LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX
- AND NOT LIBCXX_ENABLE_SHARED)
- message(FATAL_ERROR "LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX being ON requires LIBCXX_ENABLE_SHARED to be ON")
-endif()
-
-if(DEFINED LIBCXX_ENABLE_STATIC
- AND NOT LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX
- AND NOT LIBCXX_ENABLE_STATIC)
- message(FATAL_ERROR "LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX being OFF requires LIBCXX_ENABLE_STATIC to be ON")
-endif()
-
if (LLVM_EXTERNAL_LIBCXX_SOURCE_DIR)
set(LIBCXXABI_LIBCXX_SRC_DIRS ${LLVM_EXTERNAL_LIBCXX_SOURCE_DIR})
else()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71894.249922.patch
Type: text/x-patch
Size: 3542 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200312/59368600/attachment.bin>
More information about the llvm-commits
mailing list