Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use rustc's knowledge of LLVM/Clang target triples #1252

Merged
merged 10 commits into from
Nov 2, 2024

Conversation

madsmtm
Copy link
Contributor

@madsmtm madsmtm commented Nov 1, 2024

Part of #1249.

I tried to keep it separate from cleaning up the Apple stuff, but things were quite intertwined, so I ended up having to do some of it. Still, this PR aims to have as few functional changes as possible (the only effect should be that we now use the correct Clang target).

Fixes #542 (was fixed before, but now we do it properly by passing arm64-apple-macosx instead of arm64-apple-darwin).
Fixes #1255.
Fixes #1205.
Might improve the situation in #1005.

This affects (checking local test script...) 128 targets, though I feel pretty confident that the change is correct, and if it's not, then it's likely an issue in rustc as well.

@madsmtm madsmtm force-pushed the llvm-target branch 3 times, most recently from 880da47 to d351ff6 Compare November 1, 2024 06:30
Use the same LLVM target triple as rustc does
dev-tools/gen-target-info/src/main.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/target/llvm.rs Outdated Show resolved Hide resolved
src/target/llvm.rs Outdated Show resolved Hide resolved
@madsmtm madsmtm marked this pull request as ready for review November 1, 2024 23:36
@madsmtm madsmtm requested a review from NobodyXu November 1, 2024 23:36
Copy link
Collaborator

@NobodyXu NobodyXu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THanks, lGTM!

@NobodyXu NobodyXu merged commit 9c663ca into rust-lang:main Nov 2, 2024
27 checks passed
@madsmtm madsmtm deleted the llvm-target branch November 2, 2024 02:55
nicholasbishop added a commit to nicholasbishop/cc-rs that referenced this pull request Nov 3, 2024
This restores the behavior prior to
rust-lang#1252, when the UEFI targets were
hardcoded in src/lib.rs.
nicholasbishop added a commit to nicholasbishop/cc-rs that referenced this pull request Nov 3, 2024
This restores the behavior prior to
rust-lang#1252, when the UEFI targets were
hardcoded in src/lib.rs.
NobodyXu pushed a commit that referenced this pull request Nov 4, 2024
This restores the behavior prior to
#1252, when the UEFI targets were
hardcoded in src/lib.rs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants