mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
rustc_llvm: Link to libkstat on Solaris/SPARC
getHostCPUName calls into libkstat but as of LLVM 16.0.6 libLLVMTargetParser is not explicitly linked against libkstat causing builds to fail due to undefined symbols. See also: llvm/llvm-project#64186
This commit is contained in:
parent
03a57254b5
commit
103b2df63b
@ -241,6 +241,11 @@ fn main() {
|
||||
cmd.arg("--system-libs");
|
||||
}
|
||||
|
||||
// We need libkstat for getHostCPUName on SPARC builds.
|
||||
if target.starts_with("sparcv9") && target.contains("solaris") {
|
||||
println!("cargo:rustc-link-lib=kstat");
|
||||
}
|
||||
|
||||
if (target.starts_with("arm") && !target.contains("freebsd"))
|
||||
|| target.starts_with("mips-")
|
||||
|| target.starts_with("mipsel-")
|
||||
|
Loading…
Reference in New Issue
Block a user