[llvm] [mlir] [CI] Update Windows testing to use clang compiler. (PR #162026)
    via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Oct 22 20:49:27 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/33] [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/33] 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/33] 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/33] 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/33] 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/33] 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/33] 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/33] 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/33] 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/33] 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/33] 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/33] 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/33] 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/33] 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
 
>From 9b0ba3d97c4b5745129c6aafb64ef2c116444450 Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Sat, 11 Oct 2025 16:47:11 -0700
Subject: [PATCH 15/33] re-enable sccache; try to upload CMakeCache.txt.
---
 .ci/monolithic-windows.sh | 4 ++--
 .ci/utils.sh              | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index 84ba2ff40161f..edb5f7ed99c9c 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -61,6 +61,8 @@ 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" \
@@ -69,8 +71,6 @@ 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
diff --git a/.ci/utils.sh b/.ci/utils.sh
index 87afbbd6cdd31..cd214b83bf048 100644
--- a/.ci/utils.sh
+++ b/.ci/utils.sh
@@ -27,6 +27,7 @@ function at-exit {
   sccache --show-stats
   sccache --show-stats >> artifacts/sccache_stats.txt
   cp "${BUILD_DIR}"/.ninja_log artifacts/.ninja_log
+  cp "${BUILD_DIR}"/CMakeCache.txt artifacts/CMakeCache.txt
   cp "${MONOREPO_ROOT}"/*.log artifacts/ || :
   cp "${BUILD_DIR}"/test-results.*.xml artifacts/ || :
 
>From 5c61e2525be08d5d8b25aea8fffa9d82e759cba7 Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Sat, 11 Oct 2025 19:26:01 -0700
Subject: [PATCH 16/33] Try to compare multiple CMakeCache.txts.
---
 .ci/monolithic-windows.sh | 55 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index edb5f7ed99c9c..812e1fe9ca56e 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -69,6 +69,61 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
       -D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO" \
       -D LLVM_ENABLE_RUNTIMES="${runtimes}"
 
+cp ${BUILD_DIR}/CMakeCache.txt ${MONOREPO_ROOT}/CMakeCache.clang1.txt
+
+pushd ${BUILD_DIR}
+rm -Rf *
+popd
+
+export CC=cl
+export CXX=cl
+export LD=link
+
+cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
+      -D LLVM_ENABLE_PROJECTS="${projects}" \
+      -G Ninja \
+      -D CMAKE_BUILD_TYPE=Release \
+      -D LLVM_ENABLE_ASSERTIONS=ON \
+      -D LLVM_BUILD_EXAMPLES=ON \
+      -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" \
+      -D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO" \
+      -D LLVM_ENABLE_RUNTIMES="${runtimes}"
+
+cp ${BUILD_DIR}/CMakeCache.txt ${MONOREPO_ROOT}/CMakeCache.msvc.txt
+
+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
+
+cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
+      -D LLVM_ENABLE_PROJECTS="${projects}" \
+      -G Ninja \
+      -D CMAKE_BUILD_TYPE=Release \
+      -D LLVM_ENABLE_ASSERTIONS=ON \
+      -D LLVM_BUILD_EXAMPLES=ON \
+      -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" \
+      -D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO" \
+      -D LLVM_ENABLE_RUNTIMES="${runtimes}"
+
+cp ${BUILD_DIR}/CMakeCache.txt ${MONOREPO_ROOT}/CMakeCache.clang2.txt
+
+diff ${BUILD_DIR}/CMakeCache.clang1.txt ${BUILD_DIR}/CMakeCache.clang2.txt
+
+
 start-group "ninja"
 
 
>From 5485c856a20393f1e586e84f76b35d01596b71cf Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Sat, 11 Oct 2025 20:48:03 -0700
Subject: [PATCH 17/33] Fix typo in diff command.
---
 .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 812e1fe9ca56e..c3a2b8619bd30 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -121,7 +121,7 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
 
 cp ${BUILD_DIR}/CMakeCache.txt ${MONOREPO_ROOT}/CMakeCache.clang2.txt
 
-diff ${BUILD_DIR}/CMakeCache.clang1.txt ${BUILD_DIR}/CMakeCache.clang2.txt
+diff ${MONOREPO_ROOT}/CMakeCache.clang1.txt ${MONOREPO_ROOT}/CMakeCache.clang2.txt
 
 
 start-group "ninja"
>From 2710fa492f200a4aea3cbbb4192d526befe60321 Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Sun, 12 Oct 2025 09:50:09 -0700
Subject: [PATCH 18/33] Try to see if msvc included clang.
---
 .ci/monolithic-windows.sh | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index c3a2b8619bd30..186dae913977a 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -39,7 +39,11 @@ ls -l "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz"
 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
 
+ls -l "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/Llvm"
 
+where cl.exe
+
+where clang-cl.exe
 
 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
>From f7837283993abbf4388c563e9064d989c286cc93 Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Sun, 12 Oct 2025 09:55:36 -0700
Subject: [PATCH 19/33] FInd correct full path to cl.exe
---
 .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 186dae913977a..5e0a07c56b20c 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -39,11 +39,11 @@ ls -l "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz"
 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
 
-ls -l "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/Llvm"
+#ls -l "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/Llvm"
 
 where cl.exe
 
-where clang-cl.exe
+#where clang-cl.exe
 
 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
>From 5b5be1a8ae98f13e770b449cf8a2c099f956d1db Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Sun, 12 Oct 2025 10:14:54 -0700
Subject: [PATCH 20/33] Still looking for clang inside msvc...
---
 .ci/monolithic-windows.sh | 1 +
 1 file changed, 1 insertion(+)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index 5e0a07c56b20c..b956e56986787 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -43,6 +43,7 @@ ls -l /tmp/clang-download/clang+llvm-21.1.2-x86_64-pc-windows-msvc/bin/clang-cl.
 
 where cl.exe
 
+ls -l "C:/BuildTools/VC/Tools/*"
 #where clang-cl.exe
 
 export CC=/tmp/clang-download/clang+llvm-21.1.2-x86_64-pc-windows-msvc/bin/clang-cl.exe
>From 162d0ee05b4e67efb5e99ecf65620840a3d73f9f Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Sun, 12 Oct 2025 10:21:03 -0700
Subject: [PATCH 21/33] Still trying to find clang.
---
 .ci/monolithic-windows.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index b956e56986787..6b281a42a2f38 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -43,7 +43,9 @@ ls -l /tmp/clang-download/clang+llvm-21.1.2-x86_64-pc-windows-msvc/bin/clang-cl.
 
 where cl.exe
 
-ls -l "C:/BuildTools/VC/Tools/*"
+ls -l "C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe"
+ls -l "C:\BuildTools\VC\Tools\*"
+
 #where clang-cl.exe
 
 export CC=/tmp/clang-download/clang+llvm-21.1.2-x86_64-pc-windows-msvc/bin/clang-cl.exe
>From 8f595f2f4e652419205aa7995484e4c04f734b1a Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Sun, 12 Oct 2025 10:37:47 -0700
Subject: [PATCH 22/33] Still looking...
---
 .ci/monolithic-windows.sh | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index 6b281a42a2f38..c44a35e24619b 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -43,7 +43,11 @@ ls -l /tmp/clang-download/clang+llvm-21.1.2-x86_64-pc-windows-msvc/bin/clang-cl.
 
 where cl.exe
 
+
 ls -l "C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe"
+
+where clang-cl.exe
+
 ls -l "C:\BuildTools\VC\Tools\*"
 
 #where clang-cl.exe
>From 7e504f8509136b99aa8a8db7286a10c973d19c28 Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Sun, 12 Oct 2025 10:43:00 -0700
Subject: [PATCH 23/33] Still looking...
---
 .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 c44a35e24619b..567aafe4947c0 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -46,9 +46,9 @@ where cl.exe
 
 ls -l "C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe"
 
-where clang-cl.exe
+#where clang-cl.exe
 
-ls -l "C:\BuildTools\VC\Tools\*"
+ls -l "C:\BuildTools\VC\Tools"
 
 #where clang-cl.exe
 
>From 8dca85eacf22026a612118058ac9d1da021f7f6c Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Sun, 12 Oct 2025 16:04:25 -0700
Subject: [PATCH 24/33] Disable non-msvc settings
---
 .ci/monolithic-windows.sh | 134 +++++++++++++++++++++-----------------
 1 file changed, 73 insertions(+), 61 deletions(-)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index 567aafe4947c0..b9341c7d6da93 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -34,21 +34,21 @@ 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"
+#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 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
+#ls -l /tmp/clang-download/clang+llvm-21.1.2-x86_64-pc-windows-msvc/bin/clang-cl.exe
 
-#ls -l "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/Llvm"
+##ls -l "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/Llvm"
 
-where cl.exe
+##where cl.exe
 
 
-ls -l "C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe"
+##ls -l "C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe"
 
 #where clang-cl.exe
 
-ls -l "C:\BuildTools\VC\Tools"
+##ls -l "C:\BuildTools\VC\Tools"
 
 #where clang-cl.exe
 
@@ -78,61 +78,73 @@ 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_ENABLE_RUNTIMES="${runtimes}"
-
-cp ${BUILD_DIR}/CMakeCache.txt ${MONOREPO_ROOT}/CMakeCache.clang1.txt
-
-pushd ${BUILD_DIR}
-rm -Rf *
-popd
-
-export CC=cl
-export CXX=cl
-export LD=link
-
-cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
-      -D LLVM_ENABLE_PROJECTS="${projects}" \
-      -G Ninja \
-      -D CMAKE_BUILD_TYPE=Release \
-      -D LLVM_ENABLE_ASSERTIONS=ON \
-      -D LLVM_BUILD_EXAMPLES=ON \
-      -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" \
-      -D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO" \
-      -D LLVM_ENABLE_RUNTIMES="${runtimes}"
-
-cp ${BUILD_DIR}/CMakeCache.txt ${MONOREPO_ROOT}/CMakeCache.msvc.txt
-
-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
-
-cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
-      -D LLVM_ENABLE_PROJECTS="${projects}" \
-      -G Ninja \
-      -D CMAKE_BUILD_TYPE=Release \
-      -D LLVM_ENABLE_ASSERTIONS=ON \
-      -D LLVM_BUILD_EXAMPLES=ON \
-      -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" \
-      -D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO" \
-      -D LLVM_ENABLE_RUNTIMES="${runtimes}"
-
-cp ${BUILD_DIR}/CMakeCache.txt ${MONOREPO_ROOT}/CMakeCache.clang2.txt
-
-diff ${MONOREPO_ROOT}/CMakeCache.clang1.txt ${MONOREPO_ROOT}/CMakeCache.clang2.txt
+      -D LLVM_ENABLE_RUNTIMES="${runtimes}" \
+      -D COMPILER_SUPPORTS_WARNING_WEAK_VTABLES=OFF \
+      -D CXX_SUPPORTS_WERROR_GLOBAL_CONSTRUCTOR=OFF \
+      -D C_SUPPORTS_WERROR_GLOBAL_CONSTRUCTOR=OFF \
+      -D C_SUPPORTS_WERROR_IMPLICIT_FUNCTION_DECLARATION=OFF \
+      -D C_SUPPORTS_WERROR_MISMATCHED_TAGS=OFF \
+      -D C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW=OFF \
+      -D C_SUPPORTS_WUNDEF=OFF \
+      -D HAS_ATTRIBUTE_WARN_UNUSED_RESULT=OFF \
+      -D HAS_WERROR_GLOBAL_CTORS=OFF \
+      -D HAVE_DECL___BUILTIN_FFS=OFF \
+      -D HAVE___ATTRIBUTE__=OFF
+      
+
+##cp ${BUILD_DIR}/CMakeCache.txt ${MONOREPO_ROOT}/CMakeCache.clang1.txt
+
+##pushd ${BUILD_DIR}
+##rm -Rf *
+##popd
+
+#export CC=cl
+#export CXX=cl
+#export LD=link
+
+#cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
+#      -D LLVM_ENABLE_PROJECTS="${projects}" \
+#      -G Ninja \
+#      -D CMAKE_BUILD_TYPE=Release \
+#      -D LLVM_ENABLE_ASSERTIONS=ON \
+#      -D LLVM_BUILD_EXAMPLES=ON \
+#      -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" \
+#      -D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO" \
+#      -D LLVM_ENABLE_RUNTIMES="${runtimes}"
+
+#cp ${BUILD_DIR}/CMakeCache.txt ${MONOREPO_ROOT}/CMakeCache.msvc.txt
+
+#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
+
+#cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
+#      -D LLVM_ENABLE_PROJECTS="${projects}" \
+#      -G Ninja \
+#      -D CMAKE_BUILD_TYPE=Release \
+#      -D LLVM_ENABLE_ASSERTIONS=ON \
+#      -D LLVM_BUILD_EXAMPLES=ON \
+#      -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" \
+#      -D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO" \
+#      -D LLVM_ENABLE_RUNTIMES="${runtimes}"
+
+#cp ${BUILD_DIR}/CMakeCache.txt ${MONOREPO_ROOT}/CMakeCache.clang2.txt
+
+#diff ${MONOREPO_ROOT}/CMakeCache.clang1.txt ${MONOREPO_ROOT}/CMakeCache.clang2.txt
 
 
 start-group "ninja"
>From 57d3a2e0cc59dccda57448224dfeb9ae8f035404 Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Sun, 12 Oct 2025 20:20:03 -0700
Subject: [PATCH 25/33] Turn off EVERYTHING.
---
 .ci/monolithic-windows.sh | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index b9341c7d6da93..b011d0148b691 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -45,6 +45,7 @@ tar xf "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar"
 
 
 ##ls -l "C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe"
+##ls -l "C:\BuildTools\VC\Tools\Llvm\x64\bin\clang-cl.exe"
 
 #where clang-cl.exe
 
@@ -89,7 +90,29 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
       -D HAS_ATTRIBUTE_WARN_UNUSED_RESULT=OFF \
       -D HAS_WERROR_GLOBAL_CTORS=OFF \
       -D HAVE_DECL___BUILTIN_FFS=OFF \
-      -D HAVE___ATTRIBUTE__=OFF
+      -D HAVE___ATTRIBUTE__=OFF \
+      -D CMAKE_ADDR2LINE-ADVANCED=OFF \
+      -D CMAKE_ASM_COMPILER_AR-ADVANCED=OFF \
+      -D CMAKE_ASM_COMPILER_RANLIB-ADVANCED=OFF \
+      -D CMAKE_CXX_COMPILER_AR-ADVANCED=OFF \
+      -D CMAKE_CXX_COMPILER_RANLIB-ADVANCED=OFF \
+      -D CMAKE_C_COMPILER_AR-ADVANCED=OFF \
+      -D CMAKE_C_COMPILER_RANLIB-ADVANCED=OFF \
+      -D CMAKE_DLLTOOL-ADVANCED=OFF \
+      -D CMAKE_NM-ADVANCED=OFF \
+      -D CMAKE_OBJCOPY-ADVANCED=OFF \
+      -D CMAKE_OBJDUMP-ADVANCED=OFF \
+      -D CMAKE_RANLIB-ADVANCED=OFF \
+      -D CMAKE_READELF-ADVANCED=OFF \
+      -D CMAKE_STRIP-ADVANCED=OFF \
+      -D CXX_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG=OFF \
+      -D CXX_SUPPORTS_MISLEADING_INDENTATION_FLAG=OFF \
+      -D CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG=OFF \
+      -D CXX_WSUGGEST_OVERRIDE_ALLOWS_ONLY_FINAL=OFF \
+      -D C_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG=OFF \
+      -D C_SUPPORTS_MISLEADING_INDENTATION_FLAG=OFF \
+      -D C_WCOMMENT_ALLOWS_LINE_WRAP=OFF \
+      -D HAS_FLTO_THIN=OFF 
       
 
 ##cp ${BUILD_DIR}/CMakeCache.txt ${MONOREPO_ROOT}/CMakeCache.clang1.txt
>From cdaa3cdab67cd4e5f05c22bd125e5efab18c25a9 Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Sun, 12 Oct 2025 21:33:08 -0700
Subject: [PATCH 26/33] Restore original config.
---
 .ci/monolithic-windows.sh | 69 ++++++++++++++++++++-------------------
 1 file changed, 35 insertions(+), 34 deletions(-)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index b011d0148b691..3bb626f3e658f 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -79,40 +79,41 @@ 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_ENABLE_RUNTIMES="${runtimes}" \
-      -D COMPILER_SUPPORTS_WARNING_WEAK_VTABLES=OFF \
-      -D CXX_SUPPORTS_WERROR_GLOBAL_CONSTRUCTOR=OFF \
-      -D C_SUPPORTS_WERROR_GLOBAL_CONSTRUCTOR=OFF \
-      -D C_SUPPORTS_WERROR_IMPLICIT_FUNCTION_DECLARATION=OFF \
-      -D C_SUPPORTS_WERROR_MISMATCHED_TAGS=OFF \
-      -D C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW=OFF \
-      -D C_SUPPORTS_WUNDEF=OFF \
-      -D HAS_ATTRIBUTE_WARN_UNUSED_RESULT=OFF \
-      -D HAS_WERROR_GLOBAL_CTORS=OFF \
-      -D HAVE_DECL___BUILTIN_FFS=OFF \
-      -D HAVE___ATTRIBUTE__=OFF \
-      -D CMAKE_ADDR2LINE-ADVANCED=OFF \
-      -D CMAKE_ASM_COMPILER_AR-ADVANCED=OFF \
-      -D CMAKE_ASM_COMPILER_RANLIB-ADVANCED=OFF \
-      -D CMAKE_CXX_COMPILER_AR-ADVANCED=OFF \
-      -D CMAKE_CXX_COMPILER_RANLIB-ADVANCED=OFF \
-      -D CMAKE_C_COMPILER_AR-ADVANCED=OFF \
-      -D CMAKE_C_COMPILER_RANLIB-ADVANCED=OFF \
-      -D CMAKE_DLLTOOL-ADVANCED=OFF \
-      -D CMAKE_NM-ADVANCED=OFF \
-      -D CMAKE_OBJCOPY-ADVANCED=OFF \
-      -D CMAKE_OBJDUMP-ADVANCED=OFF \
-      -D CMAKE_RANLIB-ADVANCED=OFF \
-      -D CMAKE_READELF-ADVANCED=OFF \
-      -D CMAKE_STRIP-ADVANCED=OFF \
-      -D CXX_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG=OFF \
-      -D CXX_SUPPORTS_MISLEADING_INDENTATION_FLAG=OFF \
-      -D CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG=OFF \
-      -D CXX_WSUGGEST_OVERRIDE_ALLOWS_ONLY_FINAL=OFF \
-      -D C_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG=OFF \
-      -D C_SUPPORTS_MISLEADING_INDENTATION_FLAG=OFF \
-      -D C_WCOMMENT_ALLOWS_LINE_WRAP=OFF \
-      -D HAS_FLTO_THIN=OFF 
+      -D LLVM_ENABLE_RUNTIMES="${runtimes}"
+
+#      -D COMPILER_SUPPORTS_WARNING_WEAK_VTABLES=OFF \
+#      -D CXX_SUPPORTS_WERROR_GLOBAL_CONSTRUCTOR=OFF \
+#      -D C_SUPPORTS_WERROR_GLOBAL_CONSTRUCTOR=OFF \
+#      -D C_SUPPORTS_WERROR_IMPLICIT_FUNCTION_DECLARATION=OFF \
+#      -D C_SUPPORTS_WERROR_MISMATCHED_TAGS=OFF \
+#      -D C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW=OFF \
+#      -D C_SUPPORTS_WUNDEF=OFF \
+#      -D HAS_ATTRIBUTE_WARN_UNUSED_RESULT=OFF \
+#      -D HAS_WERROR_GLOBAL_CTORS=OFF \
+#      -D HAVE_DECL___BUILTIN_FFS=OFF \
+#      -D HAVE___ATTRIBUTE__=OFF \
+#      -D CMAKE_ADDR2LINE-ADVANCED=OFF \
+#      -D CMAKE_ASM_COMPILER_AR-ADVANCED=OFF \
+#      -D CMAKE_ASM_COMPILER_RANLIB-ADVANCED=OFF \
+#      -D CMAKE_CXX_COMPILER_AR-ADVANCED=OFF \
+#      -D CMAKE_CXX_COMPILER_RANLIB-ADVANCED=OFF \
+#      -D CMAKE_C_COMPILER_AR-ADVANCED=OFF \
+#      -D CMAKE_C_COMPILER_RANLIB-ADVANCED=OFF \
+#      -D CMAKE_DLLTOOL-ADVANCED=OFF \
+#      -D CMAKE_NM-ADVANCED=OFF \
+#      -D CMAKE_OBJCOPY-ADVANCED=OFF \
+#      -D CMAKE_OBJDUMP-ADVANCED=OFF \
+#      -D CMAKE_RANLIB-ADVANCED=OFF \
+#      -D CMAKE_READELF-ADVANCED=OFF \
+#      -D CMAKE_STRIP-ADVANCED=OFF \
+#      -D CXX_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG=OFF \
+#      -D CXX_SUPPORTS_MISLEADING_INDENTATION_FLAG=OFF \
+#      -D CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG=OFF \
+#      -D CXX_WSUGGEST_OVERRIDE_ALLOWS_ONLY_FINAL=OFF \
+#      -D C_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG=OFF \
+#      -D C_SUPPORTS_MISLEADING_INDENTATION_FLAG=OFF \
+#      -D C_WCOMMENT_ALLOWS_LINE_WRAP=OFF \
+#      -D HAS_FLTO_THIN=OFF 
       
 
 ##cp ${BUILD_DIR}/CMakeCache.txt ${MONOREPO_ROOT}/CMakeCache.clang1.txt
>From e65b4141f10233fa1d329c4cc171b6b5d97c2a0a Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Wed, 15 Oct 2025 16:27:00 -0700
Subject: [PATCH 27/33] Update debug flags to avoid using the Program Database.
---
 .ci/monolithic-windows.sh | 1 +
 1 file changed, 1 insertion(+)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index 3bb626f3e658f..03629c82108bf 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -79,6 +79,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_DEBUG=" /Z7 /Ob0 /Od /RTC1" \
       -D LLVM_ENABLE_RUNTIMES="${runtimes}"
 
 #      -D COMPILER_SUPPORTS_WARNING_WEAK_VTABLES=OFF \
>From b3882becea005935fbeceb165e2b5c0891feda79 Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Thu, 16 Oct 2025 08:56:40 -0700
Subject: [PATCH 28/33] Experiment with turning off warnings on Windows.
---
 mlir/lib/CMakeLists.txt | 12 ++++++++++++
 1 file changed, 12 insertions(+)
diff --git a/mlir/lib/CMakeLists.txt b/mlir/lib/CMakeLists.txt
index 91ed05f6548d7..15e743b1b35ad 100644
--- a/mlir/lib/CMakeLists.txt
+++ b/mlir/lib/CMakeLists.txt
@@ -55,3 +55,15 @@ add_mlir_library(MLIRRegisterAllExtensions
   ${conversion_libs}
   ${extension_libs}
   )
+
+set_source_file_property(Bindings/Python/IRCore.cpp
+  PROPERTY COMPILE_FLAGS "/W0"
+)
+
+set_source_file_property(Bindings/Python/IRAttributes.cpp
+  PROPERTY COMPILE_FLAGS "/W0"
+)
+
+set_source_file_property(Bindings/Python/IRTypes.cpp
+  PROPERTY COMPILE_FLAGS "/W0"
+)
>From fdd83ad785daa75a8cab49de2854f8d0e904aacb Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Thu, 16 Oct 2025 09:00:51 -0700
Subject: [PATCH 29/33] Guard warning changes for WIndows.
---
 mlir/lib/CMakeLists.txt | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/mlir/lib/CMakeLists.txt b/mlir/lib/CMakeLists.txt
index 15e743b1b35ad..3f38a180334b0 100644
--- a/mlir/lib/CMakeLists.txt
+++ b/mlir/lib/CMakeLists.txt
@@ -56,14 +56,18 @@ add_mlir_library(MLIRRegisterAllExtensions
   ${extension_libs}
   )
 
-set_source_file_property(Bindings/Python/IRCore.cpp
-  PROPERTY COMPILE_FLAGS "/W0"
-)
+if (MSVC)
+  get_source_file_property(CURRENT_FLAGS Bindings/Python/IRCore.cpp COMPILE_FLAGS)
+  set_source_file_property(Bindings/Python/IRCore.cpp
+    PROPERTY COMPILE_FLAGS ${CURRENT_FLAGS} "/W0"
+  )
 
-set_source_file_property(Bindings/Python/IRAttributes.cpp
-  PROPERTY COMPILE_FLAGS "/W0"
-)
+  get_source_file_property(CURRENT_FLAGS Bindings/Python/IRAttributes.cpp COMPILE_FLAGS)
+  set_source_file_property(Bindings/Python/IRAttributes.cpp
+    PROPERTY COMPILE_FLAGS ${CURRENT_FLAGS} "/W0"
+  )
 
-set_source_file_property(Bindings/Python/IRTypes.cpp
-  PROPERTY COMPILE_FLAGS "/W0"
-)
+  get_source_file_property(CURRENT_FLAGS Bindings/Python/IRTypes.cpp COMPILE_FLAGS)
+  set_source_file_property(Bindings/Python/IRTypes.cpp
+    PROPERTY COMPILE_FLAGS ${CURRENT_FLAGS} "/W0"
+  )
>From 1b3d32eb595c5c06a6d4b485fe93217e00eac86b Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Thu, 16 Oct 2025 10:59:41 -0700
Subject: [PATCH 30/33] Try to capture all the warnings for bad files in logs.
---
 .ci/monolithic-windows.sh |  2 +-
 mlir/lib/CMakeLists.txt   | 16 ----------------
 2 files changed, 1 insertion(+), 17 deletions(-)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index 03629c82108bf..8b2bb3d5ec353 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -176,7 +176,7 @@ start-group "ninja"
 
 
 # Targets are not escaped as they are passed as separate arguments.
-ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log
+ninja -s -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log
 
 if [[ "${runtime_targets}" != "" ]]; then
   start-group "ninja runtimes"
diff --git a/mlir/lib/CMakeLists.txt b/mlir/lib/CMakeLists.txt
index 3f38a180334b0..91ed05f6548d7 100644
--- a/mlir/lib/CMakeLists.txt
+++ b/mlir/lib/CMakeLists.txt
@@ -55,19 +55,3 @@ add_mlir_library(MLIRRegisterAllExtensions
   ${conversion_libs}
   ${extension_libs}
   )
-
-if (MSVC)
-  get_source_file_property(CURRENT_FLAGS Bindings/Python/IRCore.cpp COMPILE_FLAGS)
-  set_source_file_property(Bindings/Python/IRCore.cpp
-    PROPERTY COMPILE_FLAGS ${CURRENT_FLAGS} "/W0"
-  )
-
-  get_source_file_property(CURRENT_FLAGS Bindings/Python/IRAttributes.cpp COMPILE_FLAGS)
-  set_source_file_property(Bindings/Python/IRAttributes.cpp
-    PROPERTY COMPILE_FLAGS ${CURRENT_FLAGS} "/W0"
-  )
-
-  get_source_file_property(CURRENT_FLAGS Bindings/Python/IRTypes.cpp COMPILE_FLAGS)
-  set_source_file_property(Bindings/Python/IRTypes.cpp
-    PROPERTY COMPILE_FLAGS ${CURRENT_FLAGS} "/W0"
-  )
>From 207bba0aec169c37aa53ad5d8947f43be445134c Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Thu, 16 Oct 2025 13:22:06 -0700
Subject: [PATCH 31/33] Disable all warnings on windows.
---
 .ci/monolithic-windows.sh | 7 +++++--
 .ci/utils.sh              | 1 -
 2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index 8b2bb3d5ec353..819bb33f863e4 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -79,9 +79,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_DEBUG=" /Z7 /Ob0 /Od /RTC1" \
+      -D CMAKE_CXX_FLAGS="-w" \
+      -D CMAKE_C_FLAGS="-w" \
       -D LLVM_ENABLE_RUNTIMES="${runtimes}"
 
+#      -D CMAKE_CXX_FLAGS_DEBUG=" /Z7 /Ob0 /Od /RTC1" \
+
 #      -D COMPILER_SUPPORTS_WARNING_WEAK_VTABLES=OFF \
 #      -D CXX_SUPPORTS_WERROR_GLOBAL_CONSTRUCTOR=OFF \
 #      -D C_SUPPORTS_WERROR_GLOBAL_CONSTRUCTOR=OFF \
@@ -176,7 +179,7 @@ start-group "ninja"
 
 
 # Targets are not escaped as they are passed as separate arguments.
-ninja -s -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log
+ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log
 
 if [[ "${runtime_targets}" != "" ]]; then
   start-group "ninja runtimes"
diff --git a/.ci/utils.sh b/.ci/utils.sh
index cd214b83bf048..87afbbd6cdd31 100644
--- a/.ci/utils.sh
+++ b/.ci/utils.sh
@@ -27,7 +27,6 @@ function at-exit {
   sccache --show-stats
   sccache --show-stats >> artifacts/sccache_stats.txt
   cp "${BUILD_DIR}"/.ninja_log artifacts/.ninja_log
-  cp "${BUILD_DIR}"/CMakeCache.txt artifacts/CMakeCache.txt
   cp "${MONOREPO_ROOT}"/*.log artifacts/ || :
   cp "${BUILD_DIR}"/test-results.*.xml artifacts/ || :
 
>From d04f3c7b19742fc67ca067bc555815d1c48caa6e Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Thu, 16 Oct 2025 14:36:27 -0700
Subject: [PATCH 32/33] Only disable 2 warnings in Windows.
---
 .ci/monolithic-windows.sh | 115 ++------------------------------------
 1 file changed, 4 insertions(+), 111 deletions(-)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index 819bb33f863e4..644d45a12f001 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -23,7 +23,7 @@ runtimes_targets="${4}"
 start-group "CMake"
 pip install -q -r "${MONOREPO_ROOT}"/.ci/all_requirements.txt
 
-
+# Download & unpack 'xz' so we can use it to get clang.
 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
@@ -31,27 +31,13 @@ unzip xz-5.8.1-windows.zip
 ls -l /tmp/xz-download/bin_x86-64/xz.exe
 popd
 
+# Download & unpack clang.
 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"
+
 /tmp/xz-download/bin_x86-64/xz.exe -d -qq "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz"
 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
-
-##ls -l "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/Llvm"
-
-##where cl.exe
-
-
-##ls -l "C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe"
-##ls -l "C:\BuildTools\VC\Tools\Llvm\x64\bin\clang-cl.exe"
-
-#where clang-cl.exe
-
-##ls -l "C:\BuildTools\VC\Tools"
-
-#where clang-cl.exe
 
 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
@@ -79,102 +65,9 @@ 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="-w" \
-      -D CMAKE_C_FLAGS="-w" \
+      -D CMAKE_CXX_FLAGS="-Wno-c++98-compat -Wno-c++14-compat" \
       -D LLVM_ENABLE_RUNTIMES="${runtimes}"
 
-#      -D CMAKE_CXX_FLAGS_DEBUG=" /Z7 /Ob0 /Od /RTC1" \
-
-#      -D COMPILER_SUPPORTS_WARNING_WEAK_VTABLES=OFF \
-#      -D CXX_SUPPORTS_WERROR_GLOBAL_CONSTRUCTOR=OFF \
-#      -D C_SUPPORTS_WERROR_GLOBAL_CONSTRUCTOR=OFF \
-#      -D C_SUPPORTS_WERROR_IMPLICIT_FUNCTION_DECLARATION=OFF \
-#      -D C_SUPPORTS_WERROR_MISMATCHED_TAGS=OFF \
-#      -D C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW=OFF \
-#      -D C_SUPPORTS_WUNDEF=OFF \
-#      -D HAS_ATTRIBUTE_WARN_UNUSED_RESULT=OFF \
-#      -D HAS_WERROR_GLOBAL_CTORS=OFF \
-#      -D HAVE_DECL___BUILTIN_FFS=OFF \
-#      -D HAVE___ATTRIBUTE__=OFF \
-#      -D CMAKE_ADDR2LINE-ADVANCED=OFF \
-#      -D CMAKE_ASM_COMPILER_AR-ADVANCED=OFF \
-#      -D CMAKE_ASM_COMPILER_RANLIB-ADVANCED=OFF \
-#      -D CMAKE_CXX_COMPILER_AR-ADVANCED=OFF \
-#      -D CMAKE_CXX_COMPILER_RANLIB-ADVANCED=OFF \
-#      -D CMAKE_C_COMPILER_AR-ADVANCED=OFF \
-#      -D CMAKE_C_COMPILER_RANLIB-ADVANCED=OFF \
-#      -D CMAKE_DLLTOOL-ADVANCED=OFF \
-#      -D CMAKE_NM-ADVANCED=OFF \
-#      -D CMAKE_OBJCOPY-ADVANCED=OFF \
-#      -D CMAKE_OBJDUMP-ADVANCED=OFF \
-#      -D CMAKE_RANLIB-ADVANCED=OFF \
-#      -D CMAKE_READELF-ADVANCED=OFF \
-#      -D CMAKE_STRIP-ADVANCED=OFF \
-#      -D CXX_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG=OFF \
-#      -D CXX_SUPPORTS_MISLEADING_INDENTATION_FLAG=OFF \
-#      -D CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG=OFF \
-#      -D CXX_WSUGGEST_OVERRIDE_ALLOWS_ONLY_FINAL=OFF \
-#      -D C_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG=OFF \
-#      -D C_SUPPORTS_MISLEADING_INDENTATION_FLAG=OFF \
-#      -D C_WCOMMENT_ALLOWS_LINE_WRAP=OFF \
-#      -D HAS_FLTO_THIN=OFF 
-      
-
-##cp ${BUILD_DIR}/CMakeCache.txt ${MONOREPO_ROOT}/CMakeCache.clang1.txt
-
-##pushd ${BUILD_DIR}
-##rm -Rf *
-##popd
-
-#export CC=cl
-#export CXX=cl
-#export LD=link
-
-#cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
-#      -D LLVM_ENABLE_PROJECTS="${projects}" \
-#      -G Ninja \
-#      -D CMAKE_BUILD_TYPE=Release \
-#      -D LLVM_ENABLE_ASSERTIONS=ON \
-#      -D LLVM_BUILD_EXAMPLES=ON \
-#      -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" \
-#      -D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO" \
-#      -D LLVM_ENABLE_RUNTIMES="${runtimes}"
-
-#cp ${BUILD_DIR}/CMakeCache.txt ${MONOREPO_ROOT}/CMakeCache.msvc.txt
-
-#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
-
-#cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
-#      -D LLVM_ENABLE_PROJECTS="${projects}" \
-#      -G Ninja \
-#      -D CMAKE_BUILD_TYPE=Release \
-#      -D LLVM_ENABLE_ASSERTIONS=ON \
-#      -D LLVM_BUILD_EXAMPLES=ON \
-#      -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" \
-#      -D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO" \
-#      -D LLVM_ENABLE_RUNTIMES="${runtimes}"
-
-#cp ${BUILD_DIR}/CMakeCache.txt ${MONOREPO_ROOT}/CMakeCache.clang2.txt
-
-#diff ${MONOREPO_ROOT}/CMakeCache.clang1.txt ${MONOREPO_ROOT}/CMakeCache.clang2.txt
-
-
 start-group "ninja"
 
 
>From e613c940893e1e70cd56eff525aa1700dee97eef Mon Sep 17 00:00:00 2001
From: Caroline Tice <cmtice at google.com>
Date: Wed, 22 Oct 2025 20:48:16 -0700
Subject: [PATCH 33/33] Test removing unnecessary files from unpacked clang
 download.
---
 .ci/monolithic-windows.sh | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index 644d45a12f001..ab3dbfb61fef7 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -39,6 +39,21 @@ curl -L -o "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz" http://github.com/l
 /tmp/xz-download/bin_x86-64/xz.exe -d -qq "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz"
 tar xf "clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar"
 
+# Cleam up clang download & remove unnecessary files.
+cd /tmp/clang-download/clang+llvm-21.1.2-x86_64-pc-windows-msvc
+rm -Rf libexec
+rm -Rf share
+mv bin bin-full
+mkdir bin
+cd bin
+cp ../bin-full/*.dll .
+cp ../bin-full/clang-cl.exe .
+cp ../bin-full/lld-link.exe .
+cd ..
+rm -Rf bin-full
+popd
+
+
 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
    
    
More information about the llvm-commits
mailing list