Skip to content

Commit

Permalink
Disable outline atomics to aarch64-unknown-linux-musl.
Browse files Browse the repository at this point in the history
This is a functionally equivalent, minimally invasive backport of rust-lang#90044.

backport-of: nothing
  • Loading branch information
hkratz committed Nov 25, 2021
1 parent ef1a3b9 commit 6f53f3b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compiler/rustc_codegen_llvm/src/llvm_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,10 @@ pub fn llvm_global_features(sess: &Session) -> Vec<String> {
features.extend(sess.opts.cg.target_feature.split(',').flat_map(&filter));

// FIXME: Move outline-atomics to target definition when earliest supported LLVM is 12.
if get_version() >= (12, 0, 0) && sess.target.llvm_target.contains("aarch64-unknown-linux") {
if get_version() >= (12, 0, 0)
&& sess.target.llvm_target.contains("aarch64-unknown-linux")
&& sess.target.llvm_target != "aarch64-unknown-linux-musl"
{
features.push("+outline-atomics".to_string());
}

Expand Down

0 comments on commit 6f53f3b

Please sign in to comment.