From 1f47ff953b79b2bc8ff1093d596d0254f5c2f8cf Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Tue, 18 Mar 2025 20:48:51 +0000 Subject: [PATCH 1/2] [CI] Switch to a single runtimes build This patch makes the monolithic-linux script use a single runtimes build rather than building in three (C++03, C++26, and modules) different configurations. Queueing delays are quite high currently. This is probably due to a couple of reasons, but from what I've observed, building all these runtimes in all the configurations takes up a decent chunk of the overall build time (~10 minutes). These are configurations that I really think should be tested post-commit. Some things might slip through the cracks, but I believe there would be relatively few patches doing this. Given the tradeoffs with build times and the (or at least my) view that premerge should be testing the most common configuration for these projects only, I think it makes sense to only use one. This patch also makes it easier in the future when we need to rework the runtimes build to anticipate the deprecation of building most of the runtimes with LLVM_ENABLE_PROJECTS. --- .ci/monolithic-linux.sh | 49 ++--------------------------------------- 1 file changed, 2 insertions(+), 47 deletions(-) diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index 157dee22ace7c..42a6c44abd16d 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -91,7 +91,7 @@ if [[ "${runtimes}" != "" ]]; then INSTALL_DIR="${BUILD_DIR}/install" mkdir -p ${RUNTIMES_BUILD_DIR} - echo "--- cmake runtimes C++03" + echo "--- cmake runtimes" cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ -D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \ @@ -103,53 +103,8 @@ if [[ "${runtimes}" != "" ]]; then -D LIBCXX_CXX_ABI=libcxxabi \ -D CMAKE_BUILD_TYPE=RelWithDebInfo \ -D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ - -D LIBCXX_TEST_PARAMS="std=c++03" \ - -D LIBCXXABI_TEST_PARAMS="std=c++03" \ -D LLVM_LIT_ARGS="${lit_args}" - echo "--- ninja runtimes C++03" + echo "--- ninja runtimes" ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} - - echo "--- cmake runtimes C++26" - - rm -rf "${RUNTIMES_BUILD_DIR}" - cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ - -D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \ - -D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \ - -D CMAKE_Fortran_COMPILER="${BUILD_DIR}/bin/flang" \ - -D CMAKE_Fortran_COMPILER_WORKS=ON \ - -D LLVM_BINARY_DIR="${BUILD_DIR}" \ - -D LLVM_ENABLE_RUNTIMES="${runtimes}" \ - -D LIBCXX_CXX_ABI=libcxxabi \ - -D CMAKE_BUILD_TYPE=RelWithDebInfo \ - -D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ - -D LIBCXX_TEST_PARAMS="std=c++26" \ - -D LIBCXXABI_TEST_PARAMS="std=c++26" \ - -D LLVM_LIT_ARGS="${lit_args}" - - echo "--- ninja runtimes C++26" - - ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} - - echo "--- cmake runtimes clang modules" - - rm -rf "${RUNTIMES_BUILD_DIR}" - cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ - -D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \ - -D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \ - -D CMAKE_Fortran_COMPILER="${BUILD_DIR}/bin/flang" \ - -D CMAKE_Fortran_COMPILER_WORKS=ON \ - -D LLVM_BINARY_DIR="${BUILD_DIR}" \ - -D LLVM_ENABLE_RUNTIMES="${runtimes}" \ - -D LIBCXX_CXX_ABI=libcxxabi \ - -D CMAKE_BUILD_TYPE=RelWithDebInfo \ - -D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ - -D LIBCXX_TEST_PARAMS="enable_modules=clang" \ - -D LIBCXXABI_TEST_PARAMS="enable_modules=clang" \ - -D LLVM_LIT_ARGS="${lit_args}" - - echo "--- ninja runtimes clang modules" - - ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} -fi From cab192c0ba80f9a5fa1af7d14ed8ed0bf3440d1d Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Fri, 21 Mar 2025 07:03:51 +0000 Subject: [PATCH 2/2] feedback --- .ci/monolithic-linux.sh | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index 42a6c44abd16d..63e75da027a1e 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -91,8 +91,9 @@ if [[ "${runtimes}" != "" ]]; then INSTALL_DIR="${BUILD_DIR}/install" mkdir -p ${RUNTIMES_BUILD_DIR} - echo "--- cmake runtimes" + echo "--- cmake runtimes C++26" + rm -rf "${RUNTIMES_BUILD_DIR}" cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ -D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \ -D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \ @@ -103,8 +104,32 @@ if [[ "${runtimes}" != "" ]]; then -D LIBCXX_CXX_ABI=libcxxabi \ -D CMAKE_BUILD_TYPE=RelWithDebInfo \ -D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -D LIBCXX_TEST_PARAMS="std=c++26" \ + -D LIBCXXABI_TEST_PARAMS="std=c++26" \ -D LLVM_LIT_ARGS="${lit_args}" - echo "--- ninja runtimes" + echo "--- ninja runtimes C++26" ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes clang modules" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \ + -D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \ + -D CMAKE_Fortran_COMPILER="${BUILD_DIR}/bin/flang" \ + -D CMAKE_Fortran_COMPILER_WORKS=ON \ + -D LLVM_BINARY_DIR="${BUILD_DIR}" \ + -D LLVM_ENABLE_RUNTIMES="${runtimes}" \ + -D LIBCXX_CXX_ABI=libcxxabi \ + -D CMAKE_BUILD_TYPE=RelWithDebInfo \ + -D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -D LIBCXX_TEST_PARAMS="enable_modules=clang" \ + -D LIBCXXABI_TEST_PARAMS="enable_modules=clang" \ + -D LLVM_LIT_ARGS="${lit_args}" + + echo "--- ninja runtimes clang modules" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} +fi