mirror of
https://github.com/rust-lang/rust
synced 2024-09-30 13:54:31 +00:00
bootstrap: Link against libatomic on 32-bit SPARC
While at it, order the list of architectures alphabetically.
This commit is contained in:
parent
dc8ac3ec91
commit
8f7175c199
|
@ -407,18 +407,21 @@ fn run(self, builder: &Builder<'_>) -> LlvmResult {
|
||||||
cfg.define("LLVM_LINK_LLVM_DYLIB", "ON");
|
cfg.define("LLVM_LINK_LLVM_DYLIB", "ON");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target.starts_with("riscv") || target.starts_with("csky"))
|
if (target.starts_with("csky")
|
||||||
|
|| target.starts_with("riscv")
|
||||||
|
|| target.starts_with("sparc-"))
|
||||||
&& !target.contains("freebsd")
|
&& !target.contains("freebsd")
|
||||||
&& !target.contains("openbsd")
|
&& !target.contains("openbsd")
|
||||||
&& !target.contains("netbsd")
|
&& !target.contains("netbsd")
|
||||||
{
|
{
|
||||||
// RISC-V and CSKY GCC erroneously requires linking against
|
// CSKY and RISC-V GCC erroneously requires linking against
|
||||||
// `libatomic` when using 1-byte and 2-byte C++
|
// `libatomic` when using 1-byte and 2-byte C++
|
||||||
// atomics but the LLVM build system check cannot
|
// atomics but the LLVM build system check cannot
|
||||||
// detect this. Therefore it is set manually here.
|
// detect this. Therefore it is set manually here.
|
||||||
// Some BSD uses Clang as its system compiler and
|
// Some BSD uses Clang as its system compiler and
|
||||||
// provides no libatomic in its base system so does
|
// provides no libatomic in its base system so does
|
||||||
// not want this.
|
// not want this. 32-bit SPARC requires linking against
|
||||||
|
// libatomic as well.
|
||||||
ldflags.exe.push(" -latomic");
|
ldflags.exe.push(" -latomic");
|
||||||
ldflags.shared.push(" -latomic");
|
ldflags.shared.push(" -latomic");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue