Problem
The Windows CI build has been consistently failing across multiple PRs (#22, #23) due to a
well-known upstream issue — the official LLVM Windows installer and Chocolatey package do
not ship LLVMConfig.cmake or llvm-config.exe, which CMake's find_package(LLVM) requires.
The current scripts/setup_llvm_windows.ps1 attempts to work around this but fails because
the file simply isn't present in the Chocolatey installation. This is also confirmed by a
recent GitHub Actions runner change where llvm-config.exe was dropped entirely from
C:\Program Files\LLVM\bin.
References:
Proposed Fix
Replace the custom PowerShell script with KyleMayes/install-llvm-action, which is
specifically built to solve this problem and is widely used by compiler projects on
GitHub Actions.
In .github/workflows/*.yml, replace the Set up LLVM (Windows) step with:
- name: Install LLVM and Clang
if: matrix.os == 'windows-latest'
uses: KyleMayes/install-llvm-action@v2
with:
version: "17"
- name: Set LLVM_DIR (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
echo "LLVM_DIR=${{ env.LLVM_PATH }}/lib/cmake/llvm" >> $env:GITHUB_ENV
echo "CMAKE_PREFIX_PATH=${{ env.LLVM_PATH }}" >> $env:GITHUB_ENV
After this, scripts/setup_llvm_windows.ps1 can be removed entirely.
Problem
The Windows CI build has been consistently failing across multiple PRs (#22, #23) due to a
well-known upstream issue — the official LLVM Windows installer and Chocolatey package do
not ship
LLVMConfig.cmakeorllvm-config.exe, which CMake'sfind_package(LLVM)requires.The current
scripts/setup_llvm_windows.ps1attempts to work around this but fails becausethe file simply isn't present in the Chocolatey installation. This is also confirmed by a
recent GitHub Actions runner change where
llvm-config.exewas dropped entirely fromC:\Program Files\LLVM\bin.References:
Proposed Fix
Replace the custom PowerShell script with
KyleMayes/install-llvm-action, which isspecifically built to solve this problem and is widely used by compiler projects on
GitHub Actions.
In
.github/workflows/*.yml, replace theSet up LLVM (Windows)step with:After this,
scripts/setup_llvm_windows.ps1can be removed entirely.