-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
add target feature ABI checks for SPARC #160562
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 |
|---|---|---|
|
|
@@ -959,6 +959,11 @@ const IBMZ_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[ | |
| const SPARC_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[ | ||
| // tidy-alphabetical-start | ||
| ("leoncasa", Unstable(sym::sparc_target_feature), &[]), | ||
| ( | ||
| "soft-float", | ||
| InternalOnly { reason: "unsupported ABI-configuration feature", hard_error: false }, | ||
| &[], | ||
| ), | ||
| ("v8plus", Unstable(sym::sparc_target_feature), &[]), | ||
| ("v9", Unstable(sym::sparc_target_feature), &[]), | ||
| // tidy-alphabetical-end | ||
|
|
@@ -1454,6 +1459,26 @@ impl Target { | |
| // to other targets above.) | ||
| FeatureConstraints { required: &["hard-float"], incompatible: &["spe"] } | ||
| } | ||
| Arch::Sparc => { | ||
| // We currently don't have a soft-float target for SPARC. | ||
|
bjorn3 marked this conversation as resolved.
|
||
| // We need to pin down v8plus as it is a separate ABI (indicated in object files so | ||
| // things cannot be linked across ABI boundaries). | ||
| match self.rustc_abi { | ||
| None => FeatureConstraints { | ||
| required: &[], | ||
| incompatible: &["soft-float", "v8plus"], | ||
| }, | ||
| Some(RustcAbi::SparcV8Plus) => { | ||
| FeatureConstraints { required: &["v8plus"], incompatible: &["soft-float"] } | ||
| } | ||
| _ => unreachable!(), | ||
| } | ||
| } | ||
| Arch::Sparc64 => { | ||
| // We currently don't have a soft-float target for SPARC64. | ||
| // v8plus is for 32bit SPARC only. | ||
| FeatureConstraints { required: &[], incompatible: &["soft-float", "v8plus"] } | ||
|
Comment on lines
+1466
to
+1480
Member
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. Does the
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. This system predates target modifiers so it is currently unrelated (though I am trying to marry them in #160593). What this does is emit a warning whenever these target features are enabled via |
||
| } | ||
| Arch::Avr => { | ||
| // We only support one ABI on AVR at the moment. | ||
| // SRAM is minimum requirement for C/C++ in both avr-gcc and Clang, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
Do we need any kind of process for a new cfg value here?
View changes since the review
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.
I filed an MCP: rust-lang/compiler-team#1028