summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_llvm/build.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
commit9918693037dce8aa4bb6f08741b6812923486c18 (patch)
tree21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /compiler/rustc_llvm/build.rs
parentReleasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff)
downloadrustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz
rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compiler/rustc_llvm/build.rs')
-rw-r--r--compiler/rustc_llvm/build.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs
index fe13162cd..4b0c1229d 100644
--- a/compiler/rustc_llvm/build.rs
+++ b/compiler/rustc_llvm/build.rs
@@ -102,7 +102,7 @@ fn output(cmd: &mut Command) -> String {
fn main() {
for component in REQUIRED_COMPONENTS.iter().chain(OPTIONAL_COMPONENTS.iter()) {
- println!("cargo:rustc-check-cfg=values(llvm_component,\"{component}\")");
+ println!("cargo:rustc-check-cfg=cfg(llvm_component,values(\"{component}\"))");
}
if tracked_env_var_os("RUST_CHECK").is_some() {
@@ -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-")