diff options
| author | Nikita Popov <npopov@redhat.com> | 2022-08-01 10:02:10 +0200 |
|---|---|---|
| committer | Nikita Popov <npopov@redhat.com> | 2022-08-09 12:39:59 +0200 |
| commit | 1db81713f6475bebd0ae689ac7139c53d2843c48 (patch) | |
| tree | d623b9266c0617c5c9d6e82d76f509bd5a3fc51a /compiler/rustc_llvm/build.rs | |
| parent | 89582e8193e0da64a54c4ffae7f9fa64ed9fe2af (diff) | |
| download | rust-1db81713f6475bebd0ae689ac7139c53d2843c48.tar.gz rust-1db81713f6475bebd0ae689ac7139c53d2843c48.zip | |
Link libatomic on 32-bit targets
This is needed since https://reviews.llvm.org/D128070.
Diffstat (limited to 'compiler/rustc_llvm/build.rs')
| -rw-r--r-- | compiler/rustc_llvm/build.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs index 62ef5804dce..abb68f3afe5 100644 --- a/compiler/rustc_llvm/build.rs +++ b/compiler/rustc_llvm/build.rs @@ -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); |
