From 61ac138b5cc9c6e6d7a4ac33135c6086d2d4d644 Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Sat, 5 Sep 2020 11:33:01 +0200 Subject: [PATCH] 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. --- compiler/rustc_target/src/spec/avr_gnu_base.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/rustc_target/src/spec/avr_gnu_base.rs b/compiler/rustc_target/src/spec/avr_gnu_base.rs index ff559c2bfd684..527a322d56a4f 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() }, })