[llvm] [CI] Increase Configurability of Monolithic Windows Build (PR #124328)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 24 15:35:16 PST 2025


https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/124328

>From d1255af1abe829b4a174ded56596f5dfd0210ddc Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Fri, 24 Jan 2025 19:03:54 +0000
Subject: [PATCH 1/3] [CI] Increase Configurability of Monolithic Windows Build

This patch makes it so that the caller of monolithic-windows.sh can set the
maximum number of parallel compile/link jobs in an environment variable rather
than manually specifying it inside of the CMake. Additionally, the env
variable definitions for CC, CXX, and LD are sunk into the shell script due to
those config options being pretty inherent to what the pipeline is testing.

This is intended to make things more flexible/useable for the new premerge
CI pipeline, particularly as we are looking at using larger runners and want
the increased flexibility to experiment.
---
 .ci/generate-buildkite-pipeline-premerge | 5 ++---
 .ci/monolithic-windows.sh                | 8 ++++++--
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/.ci/generate-buildkite-pipeline-premerge b/.ci/generate-buildkite-pipeline-premerge
index 9d9ca321839449..e547afaeb722f5 100755
--- a/.ci/generate-buildkite-pipeline-premerge
+++ b/.ci/generate-buildkite-pipeline-premerge
@@ -128,9 +128,8 @@ if [[ "${windows_projects}" != "" ]]; then
         limit: 2
   timeout_in_minutes: 150
   env:
-    CC: 'cl'
-    CXX: 'cl'
-    LD: 'link'
+    MAX_PARALLEL_COMPILE_JOBS: '16'
+    MAX_PARALLEL_LINK_JOBS: '4'
   commands:
   - 'C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64'
   - 'bash .ci/monolithic-windows.sh "$(echo ${windows_projects} | tr ' ' ';')" "$(echo ${windows_check_targets})"'
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index 68303a3ea153a9..57b276f3e1df05 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -50,6 +50,10 @@ echo "--- cmake"
 pip install -q -r "${MONOREPO_ROOT}"/mlir/python/requirements.txt
 pip install -q -r "${MONOREPO_ROOT}"/.ci/requirements.txt
 
+export CC=cl
+export CXX=cl
+export LD=link
+
 # The CMAKE_*_LINKER_FLAGS to disable the manifest come from research
 # on fixing a build reliability issue on the build server, please
 # see https://github.com/llvm/llvm-project/pull/82393 and
@@ -72,8 +76,8 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
       -D CMAKE_EXE_LINKER_FLAGS="/MANIFEST:NO" \
       -D CMAKE_MODULE_LINKER_FLAGS="/MANIFEST:NO" \
       -D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO" \
-      -D LLVM_PARALLEL_COMPILE_JOBS=16 \
-      -D LLVM_PARALLEL_LINK_JOBS=4
+      -D LLVM_PARALLEL_COMPILE_JOBS=${MAX_PARALLEL_COMPILE_JOBS} \
+      -D LLVM_PARALLEL_LINK_JOBS=${MAX_PARALLEL_LINK_JOBS}
 
 echo "--- ninja"
 # Targets are not escaped as they are passed as separate arguments.

>From 3738730017f428cbbb47bb3558e03bbc165e2943 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Fri, 24 Jan 2025 21:46:09 +0000
Subject: [PATCH 2/3] bump build for testing

---
 llvm/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index ad12100fdb5b89..3ea8f6e17a6384 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -1,5 +1,5 @@
 # See docs/CMake.html for instructions about how to build LLVM with CMake.
-
+# comment
 cmake_minimum_required(VERSION 3.20.0)
 
 include(CMakeDependentOption)

>From f95a796263b204aa15f4210fac297a333b42200f Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Fri, 24 Jan 2025 23:34:55 +0000
Subject: [PATCH 3/3] Revert "bump build for testing"

This reverts commit 3738730017f428cbbb47bb3558e03bbc165e2943.
---
 llvm/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 3ea8f6e17a6384..ad12100fdb5b89 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -1,5 +1,5 @@
 # See docs/CMake.html for instructions about how to build LLVM with CMake.
-# comment
+
 cmake_minimum_required(VERSION 3.20.0)
 
 include(CMakeDependentOption)



More information about the llvm-commits mailing list