Skip to content

Commit

Permalink
Link libatomic on 32-bit targets
Browse files Browse the repository at this point in the history
This is needed since https://reviews.llvm.org/D128070.
  • Loading branch information
nikic committed Aug 9, 2022
1 parent 89582e8 commit 1db8171
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions compiler/rustc_llvm/build.rs
Expand Up @@ -242,6 +242,13 @@ fn main() {
println!("cargo:rustc-link-lib=uuid");
} else if target.contains("netbsd") || target.contains("haiku") || target.contains("darwin") {
println!("cargo:rustc-link-lib=z");
} else if target.starts_with("arm")
|| target.starts_with("mips-")
|| target.starts_with("mipsel-")
|| target.starts_with("powerpc-")
{
// 32-bit targets need to link libatomic.
println!("cargo:rustc-link-lib=atomic");
}
cmd.args(&components);

Expand Down

0 comments on commit 1db8171

Please sign in to comment.