Skip to content

Commit e406274

Browse files
authored
Unrolled build for rust-lang#136170
Rollup merge of rust-lang#136170 - taiki-e:atomics-32, r=workingjubilee Reject unsound toggling of Arm atomics-32 target feature This target feature has the same semantics as RISC-V `forced-atomics` target feature that already marked as Forbidden (llvm/llvm-project@f5ed0cb) and toggling it can cause ABI incompatibility. https://github.com/rust-lang/rust/blob/2f348cb7ce4063fa4eb40038e6ada3c5214717bd/compiler/rustc_target/src/target_features.rs#L479-L483 [Comment on feature definition in LLVM](https://github.com/llvm/llvm-project/blob/7109f521975e9cc2e8ba4f52ac2a8e1140bd49b5/llvm/lib/Target/ARM/ARMFeatures.td#L572-L574) also says: > Code built with this feature is not ABI-compatible with code built without this feature, if atomic variables are exposed across the ABI boundary. r? `@workingjubilee` or `@RalfJung` `@rustbot` label +O-Arm
2 parents 61cc3e5 + 7f83f8a commit e406274

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler/rustc_target/src/target_features.rs

+5
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ const ARM_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
135135
// tidy-alphabetical-start
136136
("aclass", Unstable(sym::arm_target_feature), &[]),
137137
("aes", Unstable(sym::arm_target_feature), &["neon"]),
138+
(
139+
"atomics-32",
140+
Stability::Forbidden { reason: "unsound because it changes the ABI of atomic operations" },
141+
&[],
142+
),
138143
("crc", Unstable(sym::arm_target_feature), &[]),
139144
("d32", Unstable(sym::arm_target_feature), &[]),
140145
("dotprod", Unstable(sym::arm_target_feature), &["neon"]),

0 commit comments

Comments
 (0)