add target feature ABI checks for SPARC - #160562
Conversation
|
These commits modify compiler targets. |
|
r? @fee1-dead rustbot has assigned @fee1-dead. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
|
Ah, the |
| VecDefault = "vec-default", | ||
| VecExtAbi = "vec-extabi", | ||
| X32 = "x32", | ||
| V8Plus = "v8plus", |
There was a problem hiding this comment.
Do we need any kind of process for a new cfg value here?
This comment has been minimized.
This comment has been minimized.
|
@rustbot reroll |
|
@rustbot reroll |
|
I don't really know anything about SPARC nor have I touched the compiler machinery for these checks yet. Maybe one of the people pinged earlier wants to take this? If not, I guess that's my chance to learn some more funny cursed trivia, but it'll take a while. |
This comment has been minimized.
This comment has been minimized.
|
These commits modify compiler targets. |
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@hanna-kruppe MCP finished, now only the review is left. Or maybe one of the folks reading along could do that (@workingjubilee @tgross35 ?) One point that was not fully resolved in the MCP is "v8plus" vs "v8+" for the |
|
AFAIK this only applies to |
|
Oh, right. |
|
We're going with "v8plus": #t-compiler/major changes > Expose `target_abi = "v8plus"` on sparc-… compiler-team#1028 @ 💬. This PR is ready then :) |
|
r? @tgross35 |
|
|
| 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"] } |
There was a problem hiding this comment.
Does the incompatible list make these target modifiers and prevent linking? I'm not sure whether that is something we should be testing.
There was a problem hiding this comment.
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 -Ctarget-feature or even implicitly via -Ctarget-cpu (with a note that this warning will become a hard error eventually). It also causes a hard error when they are enabled via #[target_feature].
add target feature ABI checks for SPARC Fixes rust-lang#157083 MCP: rust-lang/compiler-team#1028 Cc @psumbera @kulikjak @workingjubilee @taiki-e @jonathanpallant I hope this makes sense :)
add target feature ABI checks for SPARC Fixes rust-lang#157083 MCP: rust-lang/compiler-team#1028 Cc @psumbera @kulikjak @workingjubilee @taiki-e @jonathanpallant I hope this makes sense :)
…uwer Rollup of 21 pull requests Successful merges: - #158609 (Update sccache to 0.16.0) - #150075 (Implement clamp_to) - #159103 (fix(reborrow): recursive implementation) - #160562 (add target feature ABI checks for SPARC) - #160848 (std: avoid aliasing violations when wrapping opaque C types) - #161421 (Include startup crt objects on WASI for more outputs) - #161805 (Prefer ambiguous candidates when deduplicating traits in scope, so `ambiguous_glob_imported_traits` doesn't depend on import order) - #161862 (Put data segment in specified section with link_section on wasm) - #161866 (delegation: add tests fixating behavior of delegating to default trait implementations) - #161456 (reduce perf impact of scalar size checks) - #161528 (Add regression test to ensure optimal compilation) - #161666 (Print vendor instructions in `x vendor`) - #161730 (Improve type mismatch annotation for lets with block-wrapped initializers) - #161828 (Never type after-stabilization cleanup) - #161859 (Do not optimize MIR for comptime ConstFns) - #161860 (atomicptr.rs test: remove unused import) - #161870 (bind to [::1] instead of 127.0.0.1 in documentation examples for v6 UDP methods) - #161876 (rustdoc: Correctly handle when a macro generates multiple items in `--generate-macro-expansion`) - #161889 (Add link to ownership section in ptr::read docs) - #161890 (rustdoc: some clarifying comments) - #161891 (Mark `extern_item_impls` feature as incomplete) Failed merges: - #161702 (Use `drop_guard` in some places in {core,alloc,std})
add target feature ABI checks for SPARC Fixes rust-lang#157083 MCP: rust-lang/compiler-team#1028 Cc @psumbera @kulikjak @workingjubilee @taiki-e @jonathanpallant I hope this makes sense :)
…uwer Rollup of 21 pull requests Successful merges: - #150075 (Implement clamp_to) - #159103 (fix(reborrow): recursive implementation) - #160562 (add target feature ABI checks for SPARC) - #160848 (std: avoid aliasing violations when wrapping opaque C types) - #161421 (Include startup crt objects on WASI for more outputs) - #161805 (Prefer ambiguous candidates when deduplicating traits in scope, so `ambiguous_glob_imported_traits` doesn't depend on import order) - #161862 (Put data segment in specified section with link_section on wasm) - #161866 (delegation: add tests fixating behavior of delegating to default trait implementations) - #157218 (Track items behind `cfg_select` in the same way we do for `cfg`) - #161456 (reduce perf impact of scalar size checks) - #161528 (Add regression test to ensure optimal compilation) - #161666 (Print vendor instructions in `x vendor`) - #161730 (Improve type mismatch annotation for lets with block-wrapped initializers) - #161828 (Never type after-stabilization cleanup) - #161859 (Do not optimize MIR for comptime ConstFns) - #161860 (atomicptr.rs test: remove unused import) - #161870 (bind to [::1] instead of 127.0.0.1 in documentation examples for v6 UDP methods) - #161876 (rustdoc: Correctly handle when a macro generates multiple items in `--generate-macro-expansion`) - #161889 (Add link to ownership section in ptr::read docs) - #161890 (rustdoc: some clarifying comments) - #161891 (Mark `extern_item_impls` feature as incomplete) Failed merges: - #161702 (Use `drop_guard` in some places in {core,alloc,std})
View all comments
Fixes #157083
MCP: rust-lang/compiler-team#1028
Cc @psumbera @kulikjak @workingjubilee @taiki-e @jonathanpallant I hope this makes sense :)