[libcxx-commits] [PATCH] D121822: [bootstrap] Allow passing options to sub-builds for all targets

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 18 07:12:52 PDT 2022


ldionne updated this revision to Diff 416497.
ldionne added a comment.
Herald added subscribers: libcxx-commits, arichardson.
Herald added a project: libc++.
Herald added a reviewer: libc++.
This revision now requires review to proceed.

Allow passing e.g. LIBCXX_TEST_CONFIG directly.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121822

Files:
  libcxx/utils/ci/run-buildbot
  llvm/runtimes/CMakeLists.txt


Index: llvm/runtimes/CMakeLists.txt
===================================================================
--- llvm/runtimes/CMakeLists.txt
+++ llvm/runtimes/CMakeLists.txt
@@ -343,6 +343,17 @@
     endforeach()
   endif()
 
+  # If we're passed any option like <project>_FOO, pass it through to the sub-builds.
+  foreach(runtime ${LLVM_ENABLE_RUNTIMES})
+    string(TOUPPER "${runtime}" runtime_upper)
+    foreach(variableName ${variableNames})
+      if (variableName MATCHES "^${runtime_upper}_.+")
+        string(REPLACE ";" "|" escaped_value "${${variableName}}")
+        list(APPEND ${name}_extra_args "-D${variableName}=${escaped_value}")
+      endif()
+    endforeach()
+  endforeach()
+
   if(NOT RUNTIMES_${name}_LLVM_ENABLE_RUNTIMES AND NOT RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES)
     string(REPLACE ";" "|" LLVM_ENABLE_RUNTIMES_PASSTHROUGH "${LLVM_ENABLE_RUNTIMES}")
     list(APPEND ${name}_extra_args -DLLVM_ENABLE_RUNTIMES=${LLVM_ENABLE_RUNTIMES_PASSTHROUGH})
Index: libcxx/utils/ci/run-buildbot
===================================================================
--- libcxx/utils/ci/run-buildbot
+++ libcxx/utils/ci/run-buildbot
@@ -467,7 +467,7 @@
           -DRUNTIMES_BUILD_ALLOW_DARWIN=ON \
           -DLLVM_ENABLE_ASSERTIONS=ON \
           -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-modules.cmake" \
-          -DRUNTIMES_LIBUNWIND_TEST_CONFIG="llvm-libunwind-shared.cfg.in"
+          -DLIBUNWIND_TEST_CONFIG="llvm-libunwind-shared.cfg.in"
 
     echo "+++ Running the libc++ and libc++abi tests"
     ${NINJA} -C "${BUILD_DIR}" check-runtimes


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121822.416497.patch
Type: text/x-patch
Size: 1578 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220318/96950793/attachment.bin>


More information about the libcxx-commits mailing list