Skip to content

fix(ci): Windows build failing due to missing LLVMConfig.cmake from Chocolatey LLVM install #24

Description

@bastitva0-blip

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.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions