[llvm] [ci] skip clang installation and separate configuration for runtimes. (PR #136162)
Matheus Izvekov via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 19 10:50:32 PDT 2025
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/136162
>From 0b939e9297a7a2d720ae469fb5af147c823b802a Mon Sep 17 00:00:00 2001
From: Matheus Izvekov <mizvekov at gmail.com>
Date: Thu, 17 Apr 2025 13:45:09 -0300
Subject: [PATCH] [ci] skip clang installation and separate configuration for
runtimes.
They will be built with the just built clang either way.
This avoids building the runtimes twice when LLDB is also tested.
---
.ci/monolithic-linux.sh | 53 +++++++++++------------------------------
1 file changed, 14 insertions(+), 39 deletions(-)
diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh
index a56a8bcbffecb..694629c34c777 100755
--- a/.ci/monolithic-linux.sh
+++ b/.ci/monolithic-linux.sh
@@ -18,7 +18,6 @@ set -o pipefail
MONOREPO_ROOT="${MONOREPO_ROOT:="$(git rev-parse --show-toplevel)"}"
BUILD_DIR="${BUILD_DIR:=${MONOREPO_ROOT}/build}"
-INSTALL_DIR="${BUILD_DIR}/install"
rm -rf "${BUILD_DIR}"
ccache --zero-stats
@@ -85,69 +84,45 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
-D LIBCXX_CXX_ABI=libcxxabi \
-D MLIR_ENABLE_BINDINGS_PYTHON=ON \
-D LLDB_ENABLE_PYTHON=ON \
- -D LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS=ON \
- -D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
+ -D LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS=ON
echo "--- ninja"
+
# Targets are not escaped as they are passed as separate arguments.
ninja -C "${BUILD_DIR}" -k 0 ${targets}
runtimes="${3}"
runtime_targets="${4}"
-# Compiling runtimes with just-built Clang and running their tests
-# as an additional testing for Clang.
+# Run runtimes tests.
+# We don't need to do a clean separate build of runtimes, because runtimes
+# will be built against just built clang, and because LIBCXX_TEST_PARAMS
+# and LIBCXXABI_TEST_PARAMS only affect lit configuration, which successfully
+# propagates without a clean build. Other that those two variables, builds
+# are supposed to be the same.
if [[ "${runtimes}" != "" ]]; then
if [[ "${runtime_targets}" == "" ]]; then
echo "Runtimes to build are specified, but targets are not."
exit 1
fi
- echo "--- ninja install-clang"
-
- ninja -C ${BUILD_DIR} install-clang install-clang-resource-headers
-
- RUNTIMES_BUILD_DIR="${MONOREPO_ROOT}/build-runtimes"
- INSTALL_DIR="${BUILD_DIR}/install"
- mkdir -p ${RUNTIMES_BUILD_DIR}
-
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 LLVM_ENABLE_RUNTIMES="${runtimes}" \
- -D LIBCXX_CXX_ABI=libcxxabi \
- -D CMAKE_BUILD_TYPE=RelWithDebInfo \
- -D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
+ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
-D LIBCXX_TEST_PARAMS="std=c++26" \
- -D LIBCXXABI_TEST_PARAMS="std=c++26" \
- -D LLVM_LIT_ARGS="${lit_args}"
+ -D LIBCXXABI_TEST_PARAMS="std=c++26"
echo "--- ninja runtimes C++26"
- ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets}
+ ninja -vC "${BUILD_DIR}" ${runtime_targets}
echo "--- cmake runtimes clang modules"
- # We don't need to do a clean build of runtimes, because LIBCXX_TEST_PARAMS
- # and LIBCXXABI_TEST_PARAMS only affect lit configuration, which successfully
- # propagates without a clean build. Other that those two variables, builds
- # are supposed to be the same.
-
- 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 LLVM_ENABLE_RUNTIMES="${runtimes}" \
- -D LIBCXX_CXX_ABI=libcxxabi \
- -D CMAKE_BUILD_TYPE=RelWithDebInfo \
- -D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
+ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
-D LIBCXX_TEST_PARAMS="enable_modules=clang" \
- -D LIBCXXABI_TEST_PARAMS="enable_modules=clang" \
- -D LLVM_LIT_ARGS="${lit_args}"
+ -D LIBCXXABI_TEST_PARAMS="enable_modules=clang"
echo "--- ninja runtimes clang modules"
- ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets}
+ ninja -vC "${BUILD_DIR}" ${runtime_targets}
fi
More information about the llvm-commits
mailing list