[llvm] [CI] Update Windows testing to use clang compiler. (PR #162026)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 11 15:37:32 PDT 2025
https://github.com/cmtice updated https://github.com/llvm/llvm-project/pull/162026
>From e5106e4ed70a772096aa5c73a7072ef50b966a74 Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Sun, 5 Oct 2025 12:39:44 -0700
Subject: [PATCH 01/14] [CI] Update Windows testing to use clang compiler.
Test whether or not using clang for premerge testing on Windows
will improve performance.
Currently a work-in-progress: DO NOT REVIEW! DO NOT COMMIT!
---
.ci/monolithic-windows.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index f85d6e3d51b57..5ad4899188f20 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -23,8 +23,8 @@ runtimes_targets="${4}"
start-group "CMake"
pip install -q -r "${MONOREPO_ROOT}"/.ci/all_requirements.txt
-export CC=cl
-export CXX=cl
+export CC=clang-cl
+export CXX=clang-cl
export LD=link
# The CMAKE_*_LINKER_FLAGS to disable the manifest come from research
>From cc89d8c05a39685f84b0e4e24d962a00611c4feb Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Sun, 5 Oct 2025 12:50:04 -0700
Subject: [PATCH 02/14] Try to find clang compiler.
---
.ci/monolithic-windows.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index 5ad4899188f20..51cde5f4fc878 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -23,6 +23,8 @@ runtimes_targets="${4}"
start-group "CMake"
pip install -q -r "${MONOREPO_ROOT}"/.ci/all_requirements.txt
+which clang-cl
+
export CC=clang-cl
export CXX=clang-cl
export LD=link
>From f724bfed7e758a57b56f12d6903bffbace47da4d Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Sun, 5 Oct 2025 20:46:10 -0700
Subject: [PATCH 03/14] Attempt to download the clang tarball.
---
.ci/monolithic-windows.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index 51cde5f4fc878..e82b525d47ce7 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -23,7 +23,12 @@ runtimes_targets="${4}"
start-group "CMake"
pip install -q -r "${MONOREPO_ROOT}"/.ci/all_requirements.txt
-which clang-cl
+mkdir /tmp/clang-download
+pushd /tmp/clang-download
+curl -L -o "clang+llvm-21.1.2-x86_64-pc-windows.msvc.tar.xz" http://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.2/ckabg+llvm-21.1.2-x86_64-pc-windows.msvc.tar.xz
+ls -l "clang+llvm-21.1.2-x86_64-pc-windows.msvc.tar.xz"
+
+
export CC=clang-cl
export CXX=clang-cl
>From 120878da5ec1839b39cbef069a8b8305173452e2 Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Sun, 5 Oct 2025 21:09:58 -0700
Subject: [PATCH 04/14] Decompress and unpack the clang tarball.
---
.ci/monolithic-windows.sh | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index e82b525d47ce7..8d6b5b3de633a 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -25,8 +25,11 @@ pip install -q -r "${MONOREPO_ROOT}"/.ci/all_requirements.txt
mkdir /tmp/clang-download
pushd /tmp/clang-download
-curl -L -o "clang+llvm-21.1.2-x86_64-pc-windows.msvc.tar.xz" http://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.2/ckabg+llvm-21.1.2-x86_64-pc-windows.msvc.tar.xz
-ls -l "clang+llvm-21.1.2-x86_64-pc-windows.msvc.tar.xz"
+curl -L -o "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz" http://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.2/clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz
+ls -l "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz"
+unxz "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz"
+tar xvf "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar"
+ls -l /tmp/clang-download/clang+llvm-21.1.2-x86_64-pc-windows-msvc/bin/clang-cl.exe
>From d69c6afd5fc871da8345f75a5832b2cb4468b237 Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Sun, 5 Oct 2025 21:32:04 -0700
Subject: [PATCH 05/14] Try an alternate decompression technique.
---
.ci/monolithic-windows.sh | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index 8d6b5b3de633a..b4f8a50e01df1 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -27,8 +27,7 @@ mkdir /tmp/clang-download
pushd /tmp/clang-download
curl -L -o "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz" http://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.2/clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz
ls -l "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz"
-unxz "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz"
-tar xvf "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar"
+tar xJvf "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz"
ls -l /tmp/clang-download/clang+llvm-21.1.2-x86_64-pc-windows-msvc/bin/clang-cl.exe
>From f21ebc045613aa8d5f3657d65e95942626f7779b Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Sun, 5 Oct 2025 22:16:20 -0700
Subject: [PATCH 06/14] Download xz tool.
---
.ci/monolithic-windows.sh | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index b4f8a50e01df1..27d4edc4755e6 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -23,6 +23,14 @@ runtimes_targets="${4}"
start-group "CMake"
pip install -q -r "${MONOREPO_ROOT}"/.ci/all_requirements.txt
+
+mkdir /tmp/xz-download
+pushd /tmp/xz-download
+curl -L -o xz-5.8.1-windows.zip http://github.com/tukaani-project/xz/releases/download/v5.8.1/xz-5.8.1-windows.zip
+unzip xz-5.8.1-windows.zip
+ls -l xz*
+popd
+
mkdir /tmp/clang-download
pushd /tmp/clang-download
curl -L -o "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz" http://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.2/clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz
>From 282556ecbc68245a0be7a7380cc957ce0ba8add4 Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Sun, 5 Oct 2025 22:26:27 -0700
Subject: [PATCH 07/14] Update to use downloaded xz utility.
---
.ci/monolithic-windows.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index 27d4edc4755e6..8fb15604dce18 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -28,14 +28,15 @@ mkdir /tmp/xz-download
pushd /tmp/xz-download
curl -L -o xz-5.8.1-windows.zip http://github.com/tukaani-project/xz/releases/download/v5.8.1/xz-5.8.1-windows.zip
unzip xz-5.8.1-windows.zip
-ls -l xz*
+ls -l /tmp/xz-download/bin_x86-64/xz.exe
popd
mkdir /tmp/clang-download
pushd /tmp/clang-download
curl -L -o "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz" http://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.2/clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz
ls -l "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz"
-tar xJvf "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz"
+/tmp/xz-download/bin_x86-64/xz.exe -d -qq "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz"
+tar xvf "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar"
ls -l /tmp/clang-download/clang+llvm-21.1.2-x86_64-pc-windows-msvc/bin/clang-cl.exe
>From 77d1d0f502cb47c1649931534772e166a7e405cc Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Sun, 5 Oct 2025 22:34:02 -0700
Subject: [PATCH 08/14] Update to use downloaded clang-cl for testing.
---
.ci/monolithic-windows.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index 8fb15604dce18..f37f066f98d19 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -36,13 +36,13 @@ pushd /tmp/clang-download
curl -L -o "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz" http://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.2/clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz
ls -l "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz"
/tmp/xz-download/bin_x86-64/xz.exe -d -qq "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz"
-tar xvf "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar"
+tar xf "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar"
ls -l /tmp/clang-download/clang+llvm-21.1.2-x86_64-pc-windows-msvc/bin/clang-cl.exe
-export CC=clang-cl
-export CXX=clang-cl
+export CC=/tmp/clang-download/clang+llvm-21.1.2-x86_64-pc-windows-msvc/bin/clang-cl
+export CXX=/tmp/clang-download/clang+llvm-21.1.2-x86_64-pc-windows-msvc/bin/clang-cl.exe
export LD=link
# The CMAKE_*_LINKER_FLAGS to disable the manifest come from research
>From 3062354da09765facd87b4bbae1dfa9120f04fc4 Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Mon, 6 Oct 2025 08:30:39 -0700
Subject: [PATCH 09/14] Update to use cl compiler, for timing data.
---
.ci/monolithic-windows.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index f37f066f98d19..e988d05495b68 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -41,8 +41,8 @@ ls -l /tmp/clang-download/clang+llvm-21.1.2-x86_64-pc-windows-msvc/bin/clang-cl.
-export CC=/tmp/clang-download/clang+llvm-21.1.2-x86_64-pc-windows-msvc/bin/clang-cl
-export CXX=/tmp/clang-download/clang+llvm-21.1.2-x86_64-pc-windows-msvc/bin/clang-cl.exe
+export CC=cl
+export CXX=cl
export LD=link
# The CMAKE_*_LINKER_FLAGS to disable the manifest come from research
>From 73290c1e14a7ef3a0f91ed4bad9ab833e5b6afa3 Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Mon, 6 Oct 2025 09:14:44 -0700
Subject: [PATCH 10/14] Update to use clang; more timing data.
---
.ci/monolithic-windows.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index e988d05495b68..c6a018c12c226 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -41,8 +41,8 @@ ls -l /tmp/clang-download/clang+llvm-21.1.2-x86_64-pc-windows-msvc/bin/clang-cl.
-export CC=cl
-export CXX=cl
+export CC=/tmp/clang-download/clang+llvm-21.1.2-x86_64-pc-windows-msvc/bin/clang-cl.exe
+export CXX=/tmp/clang-download/clang+llvm-21.1.2-x86_64-pc-windows-msvc/bin/clang-cl.exe
export LD=link
# The CMAKE_*_LINKER_FLAGS to disable the manifest come from research
>From db17f90f42ad1cd04ffcc671e36a433a3992593f Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Thu, 9 Oct 2025 14:00:22 -0700
Subject: [PATCH 11/14] Disable some checks, to narrow down build failures.
---
.ci/compute_projects.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.ci/compute_projects.py b/.ci/compute_projects.py
index a4cfecf0cef90..d004775cc3173 100644
--- a/.ci/compute_projects.py
+++ b/.ci/compute_projects.py
@@ -106,6 +106,9 @@
"libcxxabi",
"libunwind",
"flang-rt",
+ "mlir", #CAROLINE
+ "polly", #CAROLINE
+ "lld", #CAROLINE
}
# These are projects that we should test if the project itself is changed but
>From 5e5d87f57933d2d5388beb4a8172d373160639e8 Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Thu, 9 Oct 2025 14:40:24 -0700
Subject: [PATCH 12/14] Verifying that mlir is the build proble for clang on
Windows.
---
.ci/compute_projects.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/.ci/compute_projects.py b/.ci/compute_projects.py
index d004775cc3173..816f4a634f53e 100644
--- a/.ci/compute_projects.py
+++ b/.ci/compute_projects.py
@@ -107,8 +107,6 @@
"libunwind",
"flang-rt",
"mlir", #CAROLINE
- "polly", #CAROLINE
- "lld", #CAROLINE
}
# These are projects that we should test if the project itself is changed but
>From d9df5c8c494e3961acdb534889c5af41954de35b Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Thu, 9 Oct 2025 15:37:08 -0700
Subject: [PATCH 13/14] re-enable all tests
---
.ci/compute_projects.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/.ci/compute_projects.py b/.ci/compute_projects.py
index 816f4a634f53e..a4cfecf0cef90 100644
--- a/.ci/compute_projects.py
+++ b/.ci/compute_projects.py
@@ -106,7 +106,6 @@
"libcxxabi",
"libunwind",
"flang-rt",
- "mlir", #CAROLINE
}
# These are projects that we should test if the project itself is changed but
>From 366967a94352d52920fa18f5953c03676e47af40 Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Sat, 11 Oct 2025 15:36:39 -0700
Subject: [PATCH 14/14] See what turning off sccache does...
---
.ci/monolithic-windows.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index c6a018c12c226..84ba2ff40161f 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -61,8 +61,6 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
-D COMPILER_RT_BUILD_LIBFUZZER=OFF \
-D LLVM_LIT_ARGS="-v --xunit-xml-output ${BUILD_DIR}/test-results.xml --use-unique-output-file-name --timeout=1200 --time-tests --succinct" \
-D COMPILER_RT_BUILD_ORC=OFF \
- -D CMAKE_C_COMPILER_LAUNCHER=sccache \
- -D CMAKE_CXX_COMPILER_LAUNCHER=sccache \
-D MLIR_ENABLE_BINDINGS_PYTHON=ON \
-D CMAKE_EXE_LINKER_FLAGS="/MANIFEST:NO" \
-D CMAKE_MODULE_LINKER_FLAGS="/MANIFEST:NO" \
@@ -71,6 +69,9 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
start-group "ninja"
+# -D CMAKE_C_COMPILER_LAUNCHER=sccache \
+# -D CMAKE_CXX_COMPILER_LAUNCHER=sccache \
+
# Targets are not escaped as they are passed as separate arguments.
ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log
More information about the llvm-commits
mailing list