Skip to content

Commit 1db8171

Browse files
committed
Link libatomic on 32-bit targets
This is needed since https://reviews.llvm.org/D128070.
1 parent 89582e8 commit 1db8171

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

compiler/rustc_llvm/build.rs

+7
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,13 @@ fn main() {
242242
println!("cargo:rustc-link-lib=uuid");
243243
} else if target.contains("netbsd") || target.contains("haiku") || target.contains("darwin") {
244244
println!("cargo:rustc-link-lib=z");
245+
} else if target.starts_with("arm")
246+
|| target.starts_with("mips-")
247+
|| target.starts_with("mipsel-")
248+
|| target.starts_with("powerpc-")
249+
{
250+
// 32-bit targets need to link libatomic.
251+
println!("cargo:rustc-link-lib=atomic");
245252
}
246253
cmd.args(&components);
247254

0 commit comments

Comments
 (0)