Skip to content

Commit 37bb774

Browse files
committed
Reduce the need to set archiver via environment variables
1 parent 4606a4d commit 37bb774

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Diff for: src/bootstrap/src/utils/cc_detect.rs

+10
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,16 @@ fn cc2ar(cc: &Path, target: TargetSelection) -> Option<PathBuf> {
4444
Some(PathBuf::from("ar"))
4545
} else if target.contains("vxworks") {
4646
Some(PathBuf::from("wr-ar"))
47+
} else if target.contains("-nto-") {
48+
if target.starts_with("i586") {
49+
Some(PathBuf::from("ntox86-ar"))
50+
} else if target.starts_with("aarch64") {
51+
Some(PathBuf::from("ntoaarch64-ar"))
52+
} else if target.starts_with("x86_64") {
53+
Some(PathBuf::from("ntox86_64-ar"))
54+
} else {
55+
panic!("Unknown architecture, cannot determine archiver for Neutrino QNX");
56+
}
4757
} else if target.contains("android") || target.contains("-wasi") {
4858
Some(cc.parent().unwrap().join(PathBuf::from("llvm-ar")))
4959
} else {

0 commit comments

Comments
 (0)