[libcxx-commits] [libcxx] [libc++] Fix local runs of the bootstrapping-build job (PR #166875)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Nov 7 17:04:00 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Louis Dionne (ldionne)
<details>
<summary>Changes</summary>
The bootstrapping-build job defined in run-buildbot required the CC and CXX environment variables to be defined even though run-buildbot documents these environment variables as being optional.
It also required ccache, which may not be available for local builds.
This patch tweaks the script slightly to better deal with the absence of these environment variables/tools.
---
Full diff: https://github.com/llvm/llvm-project/pull/166875.diff
1 Files Affected:
- (modified) libcxx/utils/ci/run-buildbot (+20-7)
``````````diff
diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index 57ecf1e49dbf2..b7dcafaa3f68c 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -96,6 +96,14 @@ if [ -z "${CMAKE}" ]; then
fi
fi
+if [ -z "${CC}" ]; then
+ CC=cc
+fi
+
+if [ -z "${CXX}" ]; then
+ CXX=c++
+fi
+
function step() {
endstep
set +x
@@ -121,6 +129,13 @@ function error() {
echo "::error::$1"
}
+# Print the version of a few tools to aid diagnostics in some cases
+step "Diagnose tools in use"
+${CMAKE} --version
+${NINJA} --version
+${CC} --version
+${CXX} --version
+
function clean() {
rm -rf "${BUILD_DIR}"
}
@@ -240,12 +255,6 @@ function test-armv7m-picolibc() {
check-runtimes
}
-# Print the version of a few tools to aid diagnostics in some cases
-step "Diagnose tools in use"
-${CMAKE} --version
-${NINJA} --version
-if [ ! -z "${CXX}" ]; then ${CXX} --version; fi
-
case "${BUILDER}" in
check-generated-output)
# `! foo` doesn't work properly with `set -e`, use `! foo || false` instead.
@@ -382,12 +391,16 @@ generic-ubsan)
bootstrapping-build)
clean
+ if which ccache; then
+ CCACHE="-DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
+ fi
+
step "Generating CMake"
${CMAKE} \
-S "${MONOREPO_ROOT}/llvm" \
-B "${BUILD_DIR}" \
-GNinja -DCMAKE_MAKE_PROGRAM="${NINJA}" \
- -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \
+ ${CCACHE} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
-DLLVM_ENABLE_PROJECTS="clang;lldb" \
``````````
</details>
https://github.com/llvm/llvm-project/pull/166875
More information about the libcxx-commits
mailing list