diff options
| author | Florian Bartels <Florian.Bartels@elektrobit.com> | 2024-12-12 14:03:25 +0100 |
|---|---|---|
| committer | Florian Bartels <Florian.Bartels@elektrobit.com> | 2024-12-12 14:39:01 +0100 |
| commit | 37bb774219659d5fc7f72c83ca2481eea87ff3dd (patch) | |
| tree | e78cb5cfd70f913cff0ddc245e21d0b9ceecc61b | |
| parent | 4606a4d6fab93e53b54a4312c82e715eab8e122d (diff) | |
| download | rust-37bb774219659d5fc7f72c83ca2481eea87ff3dd.tar.gz rust-37bb774219659d5fc7f72c83ca2481eea87ff3dd.zip | |
Reduce the need to set archiver via environment variables
| -rw-r--r-- | src/bootstrap/src/utils/cc_detect.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bootstrap/src/utils/cc_detect.rs b/src/bootstrap/src/utils/cc_detect.rs index e8d5b60948a..10611490ce3 100644 --- a/src/bootstrap/src/utils/cc_detect.rs +++ b/src/bootstrap/src/utils/cc_detect.rs @@ -44,6 +44,16 @@ fn cc2ar(cc: &Path, target: TargetSelection) -> Option<PathBuf> { Some(PathBuf::from("ar")) } else if target.contains("vxworks") { Some(PathBuf::from("wr-ar")) + } else if target.contains("-nto-") { + if target.starts_with("i586") { + Some(PathBuf::from("ntox86-ar")) + } else if target.starts_with("aarch64") { + Some(PathBuf::from("ntoaarch64-ar")) + } else if target.starts_with("x86_64") { + Some(PathBuf::from("ntox86_64-ar")) + } else { + panic!("Unknown architecture, cannot determine archiver for Neutrino QNX"); + } } else if target.contains("android") || target.contains("-wasi") { Some(cc.parent().unwrap().join(PathBuf::from("llvm-ar"))) } else { |
