[libcxx-commits] [PATCH] D132411: [libcxxabi] Unbreak `LLVM_ENABLE_PROJECTS=libcxxabi` build

John Ericson via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 23 07:33:42 PDT 2022


Ericson2314 updated this revision to Diff 454840.
Ericson2314 added a comment.

Fix more things for posterity

(I will close this in a second)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132411/new/

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,11 @@
   list(APPEND LIBCXXABI_TEST_DEPS cxx_external_threads)
 endif()
 
-if(libcxx IN_LIST LLVM_ENABLE_RUNTIMES)
+# FIXME checking two lists to support different sorts of builds is bad.
+if (libcxx IN_LIST LLVM_ENABLE_RUNTIMES OR libcxx IN_LIST LLVM_ENABLE_PROJECTS)
   list(APPEND LIBCXXABI_TEST_DEPS cxx)
 endif()
-if(libunwind IN_LIST LLVM_ENABLE_RUNTIMES)
+if (libunwind IN_LIST LLVM_ENABLE_RUNTIMES OR 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,8 @@
 
 set(LIBCXXABI_LIBCXX_INCLUDES "" CACHE PATH
     "Specify path to libc++ includes.")
-if (NOT libcxx IN_LIST LLVM_ENABLE_RUNTIMES)
+# FIXME checking two lists to support different sorts of builds is bad.
+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.454840.patch
Type: text/x-patch
Size: 1972 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220823/f898180a/attachment.bin>


More information about the libcxx-commits mailing list