Skip to content

Comments

fix(ci): improve LLVM detection for Windows ARM64 release builds#488

Merged
echobt merged 1 commit intomasterfrom
fix/ci-windows-arm64-llvm-paths
Jan 29, 2026
Merged

fix(ci): improve LLVM detection for Windows ARM64 release builds#488
echobt merged 1 commit intomasterfrom
fix/ci-windows-arm64-llvm-paths

Conversation

@echobt
Copy link
Contributor

@echobt echobt commented Jan 29, 2026

Problem

The previous fix for Windows ARM64 builds only checked 2 LLVM paths (Enterprise and BuildTools), which wasn't sufficient for all CI runner configurations.

The build was failing with:

error occurred in cc-rs: failed to find tool "clang": program not found

Solution

This PR improves the LLVM detection for Windows ARM64 release builds:

  1. Expanded path search: Now checks all Visual Studio editions:

    • Enterprise
    • Professional
    • Community
    • BuildTools
  2. Multiple directory locations: Checks both:

    • C:\Program Files (x86)\...
    • C:\Program Files\...
  3. Fallback search: If no standard path is found, recursively searches for clang.exe in Program Files directories

  4. Last resort installation: If all else fails, installs LLVM via Chocolatey to ensure the build can proceed

Reference

The previous fix only checked 2 LLVM paths (Enterprise and BuildTools).
This update:
- Adds all Visual Studio editions (Enterprise, Professional, Community, BuildTools)
- Checks both 'Program Files (x86)' and 'Program Files' directories
- Falls back to searching for clang.exe recursively if not in standard paths
- As last resort, installs LLVM via chocolatey to ensure builds succeed

This should fix the 'failed to find tool clang: program not found' error
from cc-rs when building the ring crate on Windows ARM64.
@echobt echobt merged commit ca55b1c into master Jan 29, 2026
4 checks passed
@echobt echobt deleted the fix/ci-windows-arm64-llvm-paths branch January 29, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants