about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-02-13 14:44:19 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2024-02-13 15:43:42 +0100
commit2bcc73540cbadaae43b539567252f79dffd43f5a (patch)
treeff73032f34faa97959ce35bc3cb8f8a4d3c84be8
parent59546ea2d53c9f3c9f0e87bb2852d6b972ec8f8b (diff)
downloadrust-2bcc73540cbadaae43b539567252f79dffd43f5a.tar.gz
rust-2bcc73540cbadaae43b539567252f79dffd43f5a.zip
Don't join config file path if provided through `--config-file` option
-rw-r--r--build_system/src/config.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/build_system/src/config.rs b/build_system/src/config.rs
index 48be515a1f0..b48e132ebd2 100644
--- a/build_system/src/config.rs
+++ b/build_system/src/config.rs
@@ -312,7 +312,10 @@ impl ConfigInfo {
     }
 
     pub fn setup_gcc_path(&mut self) -> Result<(), String> {
-        let config_file = self.compute_path(self.config_file.as_deref().unwrap_or("config.toml"));
+        let config_file = match self.config_file.as_deref() {
+            Some(config_file) => config_file.into(),
+            None => self.compute_path("config.toml"),
+        };
         let ConfigFile {
             gcc_path,
             download_gccjit,