diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2023-11-24 23:54:18 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2023-12-04 15:29:23 +0100 |
| commit | 2ec8d46dd1b6adc116a5efba46b7aad4a5315f86 (patch) | |
| tree | b549157e2f3beb1d2f2a2e68c2449d34169b2815 | |
| parent | 53b2759bef791bad51bfcef022f2da432e6a4269 (diff) | |
| download | rust-2ec8d46dd1b6adc116a5efba46b7aad4a5315f86.tar.gz rust-2ec8d46dd1b6adc116a5efba46b7aad4a5315f86.zip | |
Correctly handle `OVERWRITE_TARGET_TRIPLE` env variable
| -rw-r--r-- | build_system/src/config.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/build_system/src/config.rs b/build_system/src/config.rs index 267f4546442..d602cec9f9f 100644 --- a/build_system/src/config.rs +++ b/build_system/src/config.rs @@ -79,6 +79,11 @@ impl ConfigInfo { self.host_triple = rustc_version_info(Some(&rustc))?.host.unwrap_or_default(); if self.target_triple.is_empty() { + if let Some(overwrite) = env.get("OVERWRITE_TARGET_TRIPLE") { + self.target_triple = overwrite.clone(); + } + } + if self.target_triple.is_empty() { self.target_triple = self.host_triple.clone(); } |
