mirror of https://github.com/rust-lang/rust.git
Rollup merge of #114224 - inferiorhumanorgans:solaris-llvm-wrapper, r=cuviper
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:
commit
03d6e7ade0
|
@ -242,6 +242,12 @@ fn main() {
|
|||
cmd.arg("--system-libs");
|
||||
}
|
||||
|
||||
// We need libkstat for getHostCPUName on SPARC builds.
|
||||
// See also: https://github.com/llvm/llvm-project/issues/64186
|
||||
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