From 5c164e54a4daec0e6f93af5a58eb9e8bf05b865e Mon Sep 17 00:00:00 2001 From: Chris Speciale Date: Fri, 20 Nov 2026 09:41:45 -0500 Subject: [PATCH] Build the clang-cl check with Visual Studio's clang-cl The runner's own LLVM comes first on PATH, and once its image moved to MSVC 14.52 the STL stopped the build with STL1000, which wants Clang 22, while that LLVM was Clang 20. The job now puts the clang-cl Visual Studio installs with its STL ahead of it, and stops with a clear error when Visual Studio has none. --- .github/workflows/main.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b18bb090..e50ecf37 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -69,6 +69,17 @@ jobs: with: haxe: 4.3.7 + # The runner's own LLVM, first on PATH, can be older than the newest MSVC + # STL accepts (STL1000 wanted Clang 22 from MSVC 14.52 when the runner had + # Clang 20), so the build uses the clang-cl Visual Studio ships with its STL + - name: Use Visual Studio's clang-cl + run: | + $vs = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -property installationPath + $llvm = Join-Path $vs "VC\Tools\Llvm\x64\bin" + if (!(Test-Path (Join-Path $llvm "clang-cl.exe"))) { throw "Visual Studio has no clang-cl in $llvm" } + & (Join-Path $llvm "clang-cl.exe") --version + $llvm | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + - name: Build the runtime tests working-directory: test/haxe run: haxe compile.hxml -D HXCPP_MSVC_LLVM -D HXCPP_M64