[libcxx-commits] [libcxx] Attempt making the libc++ bots less verbose and more understandable (PR #146774)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jul 2 13:41:04 PDT 2025
https://github.com/EricWF created https://github.com/llvm/llvm-project/pull/146774
None
>From 833e3d9bc51f2d6a667863bea7dd2cfefbbc169b Mon Sep 17 00:00:00 2001
From: Eric Fiselier <eric at efcs.ca>
Date: Wed, 2 Jul 2025 16:37:27 -0400
Subject: [PATCH] Attempt making the libc++ bots less verbose and more
understandable
---
libcxx/include/CMakeLists.txt | 3 +-
libcxx/utils/ci/run-buildbot | 60 ++++++++++++++++++++---------------
2 files changed, 35 insertions(+), 28 deletions(-)
diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt
index c334b25574305..43fe1b8cfb6d7 100644
--- a/libcxx/include/CMakeLists.txt
+++ b/libcxx/include/CMakeLists.txt
@@ -1683,8 +1683,7 @@ foreach(f ${files})
set(dst "${LIBCXX_GENERATED_INCLUDE_DIR}/${f}")
add_custom_command(OUTPUT ${dst}
DEPENDS ${src}
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
- COMMENT "Copying CXX header ${f}")
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst})
list(APPEND _all_includes "${dst}")
endforeach()
diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index d8b23be9a0323..504dda39f938c 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -48,6 +48,8 @@ if [[ $# == 0 ]]; then
exit 0
fi
+VERBOSE_FLAG=''
+
while [[ $# -gt 0 ]]; do
case ${1} in
-h|--help)
@@ -62,6 +64,12 @@ while [[ $# -gt 0 ]]; do
BUILD_DIR="${2}"
shift; shift
;;
+ --verbose)
+ # If the user passes --verbose, we enable verbose output for
+ # Ninja builds.
+ VERBOSE_FLAG='-v'
+ shift
+ ;;
*)
BUILDER="${1}"
shift
@@ -168,25 +176,25 @@ function generate-cmake-android() {
function check-runtimes() {
step "Building libc++ test dependencies"
- ${NINJA} -vC "${BUILD_DIR}" cxx-test-depends
+ ${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" cxx-test-depends
step "Running the libc++ tests"
- ${NINJA} -vC "${BUILD_DIR}" check-cxx
+ ${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" check-cxx
step "Running the libc++abi tests"
- ${NINJA} -vC "${BUILD_DIR}" check-cxxabi
+ ${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" check-cxxabi
step "Running the libunwind tests"
- ${NINJA} -vC "${BUILD_DIR}" check-unwind
+ ${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" check-unwind
}
# TODO: The goal is to test this against all configurations. We should also move
# this to the Lit test suite instead of being a separate CMake target.
function check-abi-list() {
step "Running the libc++ ABI list test"
- ${NINJA} -vC "${BUILD_DIR}" check-cxx-abilist || (
+ ${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" check-cxx-abilist || (
error "Generating the libc++ ABI list after failed check"
- ${NINJA} -vC "${BUILD_DIR}" generate-cxx-abilist
+ ${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" generate-cxx-abilist
false
)
}
@@ -233,7 +241,7 @@ function test-armv7m-picolibc() {
"${@}"
step "Installing compiler-rt"
- ${NINJA} -vC "${BUILD_DIR}/compiler-rt" install
+ ${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}/compiler-rt" install
# Move compiler-rt libs into the same directory as all the picolib objects.
mv "${INSTALL_DIR}/lib/armv7m-unknown-none-eabi"/* "${INSTALL_DIR}/lib"
@@ -256,7 +264,7 @@ check-generated-output)
# Reject patches that forgot to re-run the generator scripts.
step "Making sure the generator scripts were run"
set +x # Printing all the commands below just creates extremely confusing output
- ${NINJA} -vC "${BUILD_DIR}" libcxx-generate-files
+ ${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" libcxx-generate-files
git diff | tee ${BUILD_DIR}/generated_output.patch
git ls-files -o --exclude-standard | tee ${BUILD_DIR}/generated_output.status
! grep -q '^--- a' ${BUILD_DIR}/generated_output.patch || false
@@ -400,13 +408,13 @@ bootstrapping-build)
-DLLVM_LIT_ARGS="-sv --xunit-xml-output test-results.xml --timeout=1500 --time-tests"
step "Running the libc++ and libc++abi tests"
- ${NINJA} -vC "${BUILD_DIR}" check-runtimes
+ ${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" check-runtimes
step "Installing libc++ and libc++abi to a fake location"
- ${NINJA} -vC "${BUILD_DIR}" install-runtimes
+ ${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" install-runtimes
step "Running the LLDB libc++ data formatter tests"
- ${NINJA} -vC "${BUILD_DIR}" lldb-api-test-deps
+ ${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" lldb-api-test-deps
${BUILD_DIR}/bin/llvm-lit -sv --param dotest-args='--category libc++' "${MONOREPO_ROOT}/lldb/test/API"
ccache -s
@@ -552,7 +560,7 @@ apple-configuration)
step "Running tests against Apple-configured libc++"
# TODO: It would be better to run the tests against the fake-installed version of libc++ instead
- xcrun --sdk macosx ninja -vC "${BUILD_DIR}/${arch}" check-cxx check-cxxabi check-cxx-abilist
+ xcrun --sdk macosx ninja ${VERBOSE_FLAG} -C "${BUILD_DIR}/${arch}" check-cxx check-cxxabi check-cxx-abilist
;;
apple-system|apple-system-hardened)
clean
@@ -595,13 +603,13 @@ apple-system|apple-system-hardened)
-DCMAKE_INSTALL_NAME_DIR="/usr/lib/system"
step "Running the libc++ tests"
- ${NINJA} -vC "${BUILD_DIR}/cxx" check-cxx
+ ${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}/cxx" check-cxx
step "Running the libc++abi tests"
- ${NINJA} -vC "${BUILD_DIR}/cxx" check-cxxabi
+ ${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}/cxx" check-cxxabi
step "Running the libunwind tests"
- ${NINJA} -vC "${BUILD_DIR}/unwind" check-unwind
+ ${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}/unwind" check-unwind
;;
aarch64)
clean
@@ -659,31 +667,31 @@ clang-cl-dll)
# setting when cmake and the test driver does the right thing automatically.
generate-cmake-libcxx-win -DLIBCXX_TEST_PARAMS="enable_experimental=False"
step "Running the libc++ tests"
- ${NINJA} -vC "${BUILD_DIR}" check-cxx
+ ${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" check-cxx
;;
clang-cl-static)
clean
generate-cmake-libcxx-win -DLIBCXX_ENABLE_SHARED=OFF
step "Running the libc++ tests"
- ${NINJA} -vC "${BUILD_DIR}" check-cxx
+ ${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" check-cxx
;;
-clang-cl-no-vcruntime)
+clang-cl-no${VERBOSE_FLAG} -Cruntime)
clean
# Building libc++ in the same way as in clang-cl-dll above, but running
# tests with -D_HAS_EXCEPTIONS=0, which users might set in certain
# translation units while using libc++, even if libc++ is built with
# exceptions enabled.
generate-cmake-libcxx-win -DLIBCXX_TEST_PARAMS="enable_experimental=False" \
- -DLIBCXX_TEST_CONFIG="llvm-libc++-shared-no-vcruntime-clangcl.cfg.in"
+ -DLIBCXX_TEST_CONFIG="llvm-libc++-shared-no${VERBOSE_FLAG} -Cruntime-clangcl.cfg.in"
step "Running the libc++ tests"
- ${NINJA} -vC "${BUILD_DIR}" check-cxx
+ ${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" check-cxx
;;
clang-cl-debug)
clean
generate-cmake-libcxx-win -DLIBCXX_TEST_PARAMS="enable_experimental=False" \
-DCMAKE_BUILD_TYPE=Debug
step "Running the libc++ tests"
- ${NINJA} -vC "${BUILD_DIR}" check-cxx
+ ${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" check-cxx
;;
clang-cl-static-crt)
clean
@@ -692,7 +700,7 @@ clang-cl-static-crt)
generate-cmake-libcxx-win -DLIBCXX_ENABLE_SHARED=OFF \
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
step "Running the libc++ tests"
- ${NINJA} -vC "${BUILD_DIR}" check-cxx
+ ${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" check-cxx
;;
mingw-dll)
clean
@@ -738,7 +746,7 @@ mingw-incomplete-sysroot)
# Only test that building succeeds; there's not much extra value in running
# the tests here, as it would be equivalent to the mingw-dll config above.
step "Building the runtimes"
- ${NINJA} -vC "${BUILD_DIR}"
+ ${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}"
;;
aix)
clean
@@ -775,7 +783,7 @@ android-ndk-*)
-DLIBCXX_TEST_PARAMS="${PARAMS}" \
-DLIBCXXABI_TEST_PARAMS="${PARAMS}"
check-abi-list
- ${NINJA} -vC "${BUILD_DIR}" install-cxx install-cxxabi
+ ${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" install-cxx install-cxxabi
# Start the emulator and make sure we can connect to the adb server running
# inside of it.
@@ -788,9 +796,9 @@ android-ndk-*)
adb shell mkdir -p /data/local/tmp/adb_run
adb push "${BUILD_DIR}/lib/libc++_shared.so" /data/local/tmp/libc++/libc++_shared.so
step "Running the libc++ tests"
- ${NINJA} -vC "${BUILD_DIR}" check-cxx
+ ${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" check-cxx
step "Running the libc++abi tests"
- ${NINJA} -vC "${BUILD_DIR}" check-cxxabi
+ ${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" check-cxxabi
;;
#################################################################
# Insert vendor-specific internal configurations below.
More information about the libcxx-commits
mailing list