[llvm] [CI] Only run normal check targets if requested (PR #168412)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 17 10:03:26 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-infrastructure
Author: Aiden Grossman (boomanaiden154)
<details>
<summary>Changes</summary>
When building just the runtimes (eg a patch only touches compiler-rt), we do not actually run any normal check targets. This ends up causing an empty ninja invocation, which builds more targets than necessary. Gate the ninja build for normal check-* targets under an if statement to fix this.
---
Full diff: https://github.com/llvm/llvm-project/pull/168412.diff
2 Files Affected:
- (modified) .ci/monolithic-linux.sh (+5-3)
- (modified) .ci/monolithic-windows.sh (+5-3)
``````````diff
diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh
index 4a8418d7baa8c..ca619aa7e98a1 100755
--- a/.ci/monolithic-linux.sh
+++ b/.ci/monolithic-linux.sh
@@ -64,9 +64,11 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
start-group "ninja"
-# Targets are not escaped as they are passed as separate arguments.
-ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log
-cp ${BUILD_DIR}/.ninja_log ninja.ninja_log
+if [[ "${targets}" != "" ]]; then
+ # Targets are not escaped as they are passed as separate arguments.
+ ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log
+ cp ${BUILD_DIR}/.ninja_log ninja.ninja_log
+fi
if [[ "${runtime_targets}" != "" ]]; then
start-group "ninja Runtimes"
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index 7b926b87f3623..99e7758ce8d79 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -51,9 +51,11 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
start-group "ninja"
-# Targets are not escaped as they are passed as separate arguments.
-ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log
-cp ${BUILD_DIR}/.ninja_log ninja.ninja_log
+if [[ "${targets}" != "" ]]; then
+ # Targets are not escaped as they are passed as separate arguments.
+ ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log
+ cp ${BUILD_DIR}/.ninja_log ninja.ninja_log
+fi
if [[ "${runtimes_targets}" != "" ]]; then
start-group "ninja runtimes"
``````````
</details>
https://github.com/llvm/llvm-project/pull/168412
More information about the llvm-commits
mailing list