about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--build_system/src/config.rs17
1 files changed, 13 insertions, 4 deletions
diff --git a/build_system/src/config.rs b/build_system/src/config.rs
index e8eeb559c79..843f87c8be6 100644
--- a/build_system/src/config.rs
+++ b/build_system/src/config.rs
@@ -284,7 +284,11 @@ impl ConfigInfo {
     pub fn setup_gcc_path(&mut self) -> Result<(), String> {
         // If the user used the `--gcc-path` option, no need to look at `config.toml` content
         // since we already have everything we need.
-        if self.gcc_path.is_some() {
+        if let Some(gcc_path) = &self.gcc_path {
+            println!(
+                "`--gcc-path` was provided, ignoring config file. Using `{}` as path for libgccjit",
+                gcc_path
+            );
             return Ok(());
         }
         let config_file = match self.config_file.as_deref() {
@@ -297,10 +301,15 @@ impl ConfigInfo {
             self.download_gccjit_if_needed()?;
             return Ok(());
         }
-        if gcc_path.is_none() {
+        let Some(gcc_path) = gcc_path else {
             return Err(format!("missing `gcc-path` value from `{}`", config_file.display()));
-        }
-        self.gcc_path = gcc_path;
+        };
+        println!(
+            "GCC path retrieved from `{}`. Using `{}` as path for libgccjit",
+            config_file.display(),
+            gcc_path
+        );
+        self.gcc_path = Some(gcc_path);
         Ok(())
     }