Link libatomic on 32-bit targets

This is needed since https://reviews.llvm.org/D128070.
This commit is contained in:
Nikita Popov 2022-08-01 10:02:10 +02:00
parent 89582e8193
commit 1db81713f6

View File

@ -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);