Commit f1d623d198c for php
commit f1d623d198cc1fd1fcf660514168b97b4b8b76ed
Author: Shivam Mathur <shivam_jpr@hotmail.com>
Date: Thu Dec 3 12:12:14 2026 +0100
Use clang 22 in Windows+clang build
windows-2025-vs2026 ships with new C++ headers that are incompatible with the
default clang (20.1 at this time). Switch to clang 22.1 by modifying PATH.
Closes GH-26050
diff --git a/.github/scripts/windows/build_task.bat b/.github/scripts/windows/build_task.bat
index 1177cef3be4..71558dee587 100644
--- a/.github/scripts/windows/build_task.bat
+++ b/.github/scripts/windows/build_task.bat
@@ -26,7 +26,11 @@ if %errorlevel% neq 0 exit /b 3
if "%THREAD_SAFE%" equ "0" set ADD_CONF=%ADD_CONF% --disable-zts
if "%INTRINSICS%" neq "" set ADD_CONF=%ADD_CONF% --enable-native-intrinsics=%INTRINSICS%
if "%ASAN%" equ "1" set ADD_CONF=%ADD_CONF% --enable-sanitizer --enable-debug-pack
-if "%CLANG_TOOLSET%" equ "1" set ADD_CONF=%ADD_CONF% --with-toolset=clang
+
+if "%CLANG_TOOLSET%" equ "1" (
+ set ADD_CONF=%ADD_CONF% --with-toolset=clang
+ set "PATH=%VCINSTALLDIR%Tools\Llvm\x64\bin;%PATH%"
+)
rem C4018: comparison: signed/unsigned mismatch
rem C4146: unary minus operator applied to unsigned type