-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
target specs: stricter checks for LLVM ABI values, and correlate that with cfg(target_abi) #153769
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -127,7 +127,12 @@ pub(crate) fn base( | |
| let link_env_remove = link_env_remove(&os); | ||
| let unversioned_llvm_target = unversioned_llvm_target(&os, arch, env); | ||
| let mut opts = TargetOptions { | ||
| llvm_floatabi: Some(FloatAbi::Hard), | ||
| llvm_floatabi: if arch.target_arch() == crate::spec::Arch::Arm { | ||
| Some(FloatAbi::Hard) | ||
| } else { | ||
| // `llvm_floatabi` makes no sense on x86 and aarch64. | ||
| None | ||
| }, | ||
|
Comment on lines
+130
to
+135
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @nikic just to double check -- it is correct that x86 and aarch64 ignore LLVM's FloatAbi field, right? A quick grep seems to confirm this but I don't want to accidentally break the ABI here.^^
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CC #134932 where the original was introduced, I think it was just an oversight there.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oops, it was me? 🙈 Yeah, definitely an oversight, I didn't realize that this would also affect non-ARM targets. |
||
| os, | ||
| env: env.target_env(), | ||
| abi: env.target_abi(), | ||
|
|
||
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that all MIPS targets must set an LLVM abi, we don't need a default here any more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, I was just going to comment on that