fix(ci): improve LLVM detection for Windows ARM64 release builds#488
Merged
fix(ci): improve LLVM detection for Windows ARM64 release builds#488
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Solution
This PR improves the LLVM detection for Windows ARM64 release builds:
Expanded path search: Now checks all Visual Studio editions:
Multiple directory locations: Checks both:
C:\Program Files (x86)\...C:\Program Files\...Fallback search: If no standard path is found, recursively searches for
clang.exein Program Files directoriesLast resort installation: If all else fails, installs LLVM via Chocolatey to ensure the build can proceed
Reference