Skip to content

Commit f1a1555

Browse files
committed
Add a comment
1 parent e48350b commit f1a1555

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/setup-rust-windows/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,17 @@ runs:
1414
- uses: dtolnay/rust-toolchain@1.91.1
1515
with:
1616
targets: i686-pc-windows-msvc,x86_64-pc-windows-msvc,aarch64-pc-windows-msvc
17+
# LIBCLANG_PATH must be set explicitly so the vcxproj uses the LLVM we
18+
# install here rather than the VS-bundled LLVM whose clang headers have
19+
# AVX intrinsic bugs. The values are hardcoded literals (no attacker-
20+
# controlled input), so the GITHUB_ENV writes are safe.
1721
- name: Install LLVM for bindgen
1822
if: inputs.arch != 'arm64'
1923
shell: cmd
2024
run: |
2125
choco install llvm --allow-downgrade --no-progress --version 21.1.0
2226
if not exist "C:\Program Files\LLVM\bin\libclang.dll" exit /b 1
27+
echo LIBCLANG_PATH=C:\Program Files\LLVM\bin>> "%GITHUB_ENV%"
2328
# Chocolatey's LLVM package only ships x64 binaries, which an ARM64-native
2429
# cargo process cannot load. Install the official ARM64 build directly.
2530
- name: Install LLVM for bindgen (ARM64)
@@ -30,3 +35,4 @@ runs:
3035
Invoke-WebRequest 'https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.0/LLVM-21.1.0-woa64.exe' -OutFile $installer
3136
Start-Process -Wait -FilePath $installer -ArgumentList '/S','/D=C:\Program Files\LLVM'
3237
if (!(Test-Path 'C:\Program Files\LLVM\bin\libclang.dll')) { exit 1 }
38+
echo "LIBCLANG_PATH=C:\Program Files\LLVM\bin" >> $env:GITHUB_ENV # zizmor: ignore[environment-file]

0 commit comments

Comments
 (0)