]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs
Rollup merge of #100030 - WaffleLapkin:nice_pointer_sis, r=scottmcm
[rust.git] / compiler / rustc_target / src / spec / thumbv6m_none_eabi.rs
index dffa19ae55c04bbd5dca8252e30b575782ffa113..c9bb0112f0e3d154498c817678207010722e9bb5 100644 (file)
@@ -13,10 +13,11 @@ pub fn target() -> Target {
             abi: "eabi".into(),
             // The ARMv6-M architecture doesn't support unaligned loads/stores so we disable them
             // with +strict-align.
-            features: "+strict-align".into(),
-            // There are no atomic instructions available in the instruction set of the ARMv6-M
+            // Also force-enable 32-bit atomics, which allows the use of atomic load/store only.
+            // The resulting atomics are ABI incompatible with atomics backed by libatomic.
+            features: "+strict-align,+atomics-32".into(),
+            // There are no atomic CAS instructions available in the instruction set of the ARMv6-M
             // architecture
-            max_atomic_width: Some(0),
             atomic_cas: false,
             ..super::thumb_base::opts()
         },