From 558dd23779d794daf67bff4e07c01e5c5059e7f7 Mon Sep 17 00:00:00 2001 From: Eric Voskuil Date: Wed, 18 Nov 2026 18:19:47 -0500 Subject: [PATCH] Put the Visual Studio LLVM ahead of the image LLVM on Windows CI. --- templates/yml/base_ci_workflow.yml.gsl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/templates/yml/base_ci_workflow.yml.gsl b/templates/yml/base_ci_workflow.yml.gsl index 17fe3cd1..ab287d0c 100644 --- a/templates/yml/base_ci_workflow.yml.gsl +++ b/templates/yml/base_ci_workflow.yml.gsl @@ -820,6 +820,16 @@ jobs: if: ${{ startsWith(matrix.image, 'windows') }} uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 + - name: Prefer Visual Studio LLVM [windows] + if: ${{ startsWith(matrix.image, 'windows') }} + shell: pwsh + run: | + $arch = if ($env:RUNNER_ARCH -eq 'ARM64') { 'ARM64' } else { 'x64' } + $llvm = Join-Path $env:VCINSTALLDIR Tools Llvm $arch bin + if (-not (Test-Path (Join-Path $llvm 'clang-cl.exe'))) { throw "clang-cl not found in $llvm." } + Add-Content -Path $env:GITHUB_PATH -Value $llvm + & (Join-Path $llvm 'clang-cl.exe') --version + . endif - name: Environmental Computation shell: bash