You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #129884 - RalfJung:forbidden-target-features, r=workingjubilee
mark some target features as 'forbidden' so they cannot be (un)set with -Ctarget-feature
The context for this is #116344: some target features change the way floats are passed between functions. Changing those target features is unsound as code compiled for the same target may now use different ABIs.
So this introduces a new concept of "forbidden" target features (on top of the existing "stable " and "unstable" categories), and makes it a hard error to (un)set such a target feature. For now, the x86 and ARM feature `soft-float` is on that list. We'll have to make some effort to collect more relevant features, and similar features from other targets, but that can happen after the basic infrastructure for this landed. (These features are being collected in #131799.)
I've made this a warning for now to give people some time to speak up if this would break something.
MCP: rust-lang/compiler-team#780
target feature `{$feature}` cannot be toggled with `-Ctarget-feature`
13
+
11
14
codegen_gcc_unwinding_inline_asm =
12
15
GCC backend does not support unwinding from inline asm
13
16
@@ -24,11 +27,15 @@ codegen_gcc_lto_dylib = lto cannot be used for `dylib` crate type without `-Zdyl
24
27
codegen_gcc_lto_bitcode_from_rlib = failed to get bitcode from object file for LTO ({$gcc_err})
25
28
26
29
codegen_gcc_unknown_ctarget_feature =
27
-
unknown feature specified for `-Ctarget-feature`: `{$feature}`
28
-
.note = it is still passed through to the codegen backend
30
+
unknown and unstable feature specified for `-Ctarget-feature`: `{$feature}`
31
+
.note = it is still passed through to the codegen backend, but use of this feature might be unsound and the behavior of this feature can change in the future
29
32
.possible_feature = you might have meant: `{$rust_feature}`
30
33
.consider_filing_feature_request = consider filing a feature request
31
34
35
+
codegen_gcc_unstable_ctarget_feature =
36
+
unstable feature specified for `-Ctarget-feature`: `{$feature}`
37
+
.note = this feature is not stably supported; its behavior can change in the future
38
+
32
39
codegen_gcc_missing_features =
33
40
add the missing features in a `target_feature` attribute
0 commit comments