[PATCH] D132411: [libcxxabi] Unbreak `LLVM_ENABLE_PROJECTS=libcxxabi` build
John Ericson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 22 13:21:59 PDT 2022
Ericson2314 created this revision.
Ericson2314 added reviewers: phosek, ldionne, aaron.ballman.
Herald added a subscriber: mgorny.
Herald added a project: All.
Ericson2314 requested review of this revision.
Herald added projects: libc++abi, LLVM.
Herald added subscribers: llvm-commits, libcxx-commits.
Herald added a reviewer: libc++abi.
D132324 <https://reviews.llvm.org/D132324> was soft-reverted, this this wouldn't be by fiat prohibited
anymore.
However, builds were still failing as reported in https://reviews.llvm.org/D132324#3739383.
The issue was that D132298 <https://reviews.llvm.org/D132298> still relied on this case not happening.
Since it in fact does happen with the soft-revert, I need to accommodate
that possibility in the if condition.
Additionally make the soft-revert closer to a real revert with
`SEND_ERROR` -> `WARNING` so CMake doesn't have a non-zero exit status
after competing configuring.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D132411
Files:
libcxxabi/CMakeLists.txt
libcxxabi/test/CMakeLists.txt
llvm/CMakeLists.txt
Index: llvm/CMakeLists.txt
===================================================================
--- llvm/CMakeLists.txt
+++ llvm/CMakeLists.txt
@@ -125,7 +125,7 @@
if (${proj} IN_LIST LLVM_ENABLE_PROJECTS)
# TODO(Ericson2314): Making non-fatal for now because of out-of-tree docs
# CI jobs use this.
- message(SEND_ERROR
+ message(WARNING
"Using LLVM_ENABLE_PROJECTS=${proj} is incorrect. Please use -DLLVM_ENABLE_RUNTIMES=${proj} or "
"see the instructions at https://libcxx.llvm.org/BuildingLibcxx.html for building the runtimes.")
endif()
Index: libcxxabi/test/CMakeLists.txt
===================================================================
--- libcxxabi/test/CMakeLists.txt
+++ libcxxabi/test/CMakeLists.txt
@@ -61,10 +61,10 @@
list(APPEND LIBCXXABI_TEST_DEPS cxx_external_threads)
endif()
-if(libcxx IN_LIST LLVM_ENABLE_RUNTIMES)
+if ((NOT libcxx IN_LIST LLVM_ENABLE_RUNTIMES) AND (NOT libcxx IN_LIST LLVM_ENABLE_PROJECTS))
list(APPEND LIBCXXABI_TEST_DEPS cxx)
endif()
-if(libunwind IN_LIST LLVM_ENABLE_RUNTIMES)
+if ((NOT libunwind IN_LIST LLVM_ENABLE_RUNTIMES) AND (NOT libunwind IN_LIST LLVM_ENABLE_PROJECTS))
if (LIBCXXABI_USE_LLVM_UNWINDER AND TARGET unwind)
list(APPEND LIBCXXABI_TEST_DEPS unwind)
endif()
Index: libcxxabi/CMakeLists.txt
===================================================================
--- libcxxabi/CMakeLists.txt
+++ libcxxabi/CMakeLists.txt
@@ -133,7 +133,7 @@
set(LIBCXXABI_LIBCXX_INCLUDES "" CACHE PATH
"Specify path to libc++ includes.")
-if (NOT libcxx IN_LIST LLVM_ENABLE_RUNTIMES)
+if ((NOT libcxx IN_LIST LLVM_ENABLE_RUNTIMES) AND (NOT libcxx IN_LIST LLVM_ENABLE_PROJECTS))
if (NOT IS_DIRECTORY ${LIBCXXABI_LIBCXX_INCLUDES})
message(FATAL_ERROR
"LIBCXXABI_LIBCXX_INCLUDES=${LIBCXXABI_LIBCXX_INCLUDES} is not a valid directory. "
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132411.454605.patch
Type: text/x-patch
Size: 1852 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220822/dd3fdb35/attachment.bin>
More information about the llvm-commits
mailing list