about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-09-07 01:18:17 +0200
committerGitHub <noreply@github.com>2020-09-07 01:18:17 +0200
commit23f8dd19ff45da374323f0132567319b832c044e (patch)
treeb00acd91f04302a585452dfdf6c522a394e9b79f
parent5d8925905ce3d1498e730e90c526b2015365ff5a (diff)
parent61ac138b5cc9c6e6d7a4ac33135c6086d2d4d644 (diff)
Rollup merge of #76364 - fusion-engineering-forks:avr-no-atomic, r=jonas-schievink
Disable atomics on avr target.

`max_atomic_width` was missing in the spec, which means it fell back to the pointer width of 16 bits.

Fixes #76363.
-rw-r--r--compiler/rustc_target/src/spec/avr_gnu_base.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_target/src/spec/avr_gnu_base.rs b/compiler/rustc_target/src/spec/avr_gnu_base.rs
index ff559c2bfd6..527a322d56a 100644
--- a/compiler/rustc_target/src/spec/avr_gnu_base.rs
+++ b/compiler/rustc_target/src/spec/avr_gnu_base.rs
@@ -45,6 +45,8 @@ pub fn target(target_cpu: String) -> TargetResult {
             late_link_args: vec![(LinkerFlavor::Gcc, vec!["-lgcc".to_owned()])]
                 .into_iter()
                 .collect(),
+            max_atomic_width: Some(0),
+            atomic_cas: false,
             ..TargetOptions::default()
         },
     })