Skip to content

Commit

Permalink
Rollup merge of #76364 - fusion-engineering-forks:avr-no-atomic, r=jo…
Browse files Browse the repository at this point in the history
…nas-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.
  • Loading branch information
Dylan-DPC authored Sep 6, 2020
2 parents 5d89259 + 61ac138 commit 23f8dd1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/rustc_target/src/spec/avr_gnu_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
},
})
Expand Down

0 comments on commit 23f8dd1

Please sign in to comment.