[llvm] [CI] Update Windows premerge testing to use clang-cl.exe (PR #164900)

via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 24 14:19:22 PDT 2025


https://github.com/cmtice updated https://github.com/llvm/llvm-project/pull/164900

>From a054f5225e8c05eb5a6d2d5ca1016906bc1b59a4 Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Thu, 23 Oct 2025 14:36:15 -0700
Subject: [PATCH 1/4] [CI] Update Windows premerge testing to use clang-cl.exe

Now that the Windows container contains clang, use it for building
the premerge tests. Measurements show this is significantly faster
than using msvc cl. Note we had to disable two warnings
-Wc++98-compat and -Wc++14-compat, to make this work with 'check-mlir'
on Windows (clang generates a lot of warnings that msvc cl does not).
---
 .ci/monolithic-windows.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index 219979dd3e36e..89d608d9eb9b7 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=C:\clang\clang-msvc\bin\clang-cl.exe
+export CXX=C:\clang\clang-msvc\bin\clang-cl.exe
 export LD=link
 
 # The CMAKE_*_LINKER_FLAGS to disable the manifest come from research
@@ -49,10 +49,12 @@ 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 CMAKE_CXX_FLAGS="-Wno-c++98-compat -Wno-c++14-compat" \
       -D LLVM_ENABLE_RUNTIMES="${runtimes}"
 
 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

>From 7301810c90a48880f5682bd7c54ea1665f14f3a4 Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Thu, 23 Oct 2025 15:35:31 -0700
Subject: [PATCH 2/4] Remove extra blank line.

---
 .ci/monolithic-windows.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index 89d608d9eb9b7..f3d478f4de1c5 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -54,7 +54,6 @@ 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

>From 6b5950110f44d10a8de2e49c7cefd5a8f61b747d Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Thu, 23 Oct 2025 16:35:37 -0700
Subject: [PATCH 3/4] Change backslashes to forward slashes in clang path name.

---
 .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 f3d478f4de1c5..fd86e5e17f7ad 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=C:\clang\clang-msvc\bin\clang-cl.exe
-export CXX=C:\clang\clang-msvc\bin\clang-cl.exe
+export CC=C:/clang/clang-msvc/bin/clang-cl.exe
+export CXX=C:/clang/clang-msvc/bin/clang-cl.exe
 export LD=link
 
 # The CMAKE_*_LINKER_FLAGS to disable the manifest come from research

>From ba2766f6fe0f2a4e687eafbbb081449766cbc829 Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Fri, 24 Oct 2025 14:18:07 -0700
Subject: [PATCH 4/4] Disable -Wunsafe-buffer-usage and -Wold-style-cast, too.

---
 .ci/monolithic-windows.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index fd86e5e17f7ad..5fb8f69528e89 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -49,7 +49,7 @@ 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 CMAKE_CXX_FLAGS="-Wno-c++98-compat -Wno-c++14-compat" \
+      -D CMAKE_CXX_FLAGS="-Wno-c++98-compat -Wno-c++14-compat -Wno-unsafe-buffer-usage -Wno-old-style-cast" \
       -D LLVM_ENABLE_RUNTIMES="${runtimes}"
 
 start-group "ninja"



More information about the llvm-commits mailing list