Skip to content

Commit d0d8989

Browse files
Build the clang-cl check with Visual Studio's clang-cl (#480)
The Windows runner moved to MSVC 14.52, whose STL wants Clang 22, while the runner's own LLVM first on PATH is Clang 20. The clang-cl job now uses the clang-cl Visual Studio installs with its STL.
2 parents ec235c6 + 5c164e5 commit d0d8989

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎.github/workflows/main.yml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,17 @@ jobs:
6969
with:
7070
haxe: 4.3.7
7171

72+
# The runner's own LLVM, first on PATH, can be older than the newest MSVC
73+
# STL accepts (STL1000 wanted Clang 22 from MSVC 14.52 when the runner had
74+
# Clang 20), so the build uses the clang-cl Visual Studio ships with its STL
75+
- name: Use Visual Studio's clang-cl
76+
run: |
77+
$vs = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -property installationPath
78+
$llvm = Join-Path $vs "VC\Tools\Llvm\x64\bin"
79+
if (!(Test-Path (Join-Path $llvm "clang-cl.exe"))) { throw "Visual Studio has no clang-cl in $llvm" }
80+
& (Join-Path $llvm "clang-cl.exe") --version
81+
$llvm | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
82+
7283
- name: Build the runtime tests
7384
working-directory: test/haxe
7485
run: haxe compile.hxml -D HXCPP_MSVC_LLVM -D HXCPP_M64

0 commit comments

Comments
 (0)