Repository navigation
Map *-windows-gnullvm targets to *-windows-gnu for clang - #3505
Merged
Merged
Conversation
Clang does not know the gnullvm environment and rejects the triple ("version 'llvm' in target triple
is invalid"), so a build script cross-compiling to a gnullvm target failed as soon as bindgen passed
--target. The gnullvm targets use the same clang triple as their gnu counterparts.
mati865
approved these changes
Sep 27, 2026
emilio
approved these changes
Sep 27, 2026
Contributor
|
Can't test this myself right now but code wise looks good. |
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.
Clang doesn't know the
gnullvmenvironment:--target=x86_64-pc-windows-gnullvmfails witherror: version 'llvm' in target triple 'x86_64-pc-windows-gnullvm' is invalid. When a build script cross-compiles to a gnullvm target,find_effective_targettakesTARGETand passes it to libclang unchanged, so binding generation fails. Native gnullvm builds aren't affected because no--targetis added when host and target match.The gnullvm targets use the same clang triple as their gnu counterparts (rustc's own
llvm-targetfor them is*-pc-windows-gnu, and cc-rs maps them the same way), sorust_to_clang_targetnow rewrites the environment the way it already does for Apple, RISC-V and ESP-IDF targets.