Skip to content

Commit b8218f0

Browse files
Add log to mention what GCC path the build script is using and where it comes from
1 parent 4798615 commit b8218f0

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

Diff for: build_system/src/config.rs

+13-4
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,11 @@ impl ConfigInfo {
284284
pub fn setup_gcc_path(&mut self) -> Result<(), String> {
285285
// If the user used the `--gcc-path` option, no need to look at `config.toml` content
286286
// since we already have everything we need.
287-
if self.gcc_path.is_some() {
287+
if let Some(gcc_path) = &self.gcc_path {
288+
println!(
289+
"`--gcc-path` was provided, ignoring config file. Using `{}` as path for libgccjit",
290+
gcc_path
291+
);
288292
return Ok(());
289293
}
290294
let config_file = match self.config_file.as_deref() {
@@ -297,10 +301,15 @@ impl ConfigInfo {
297301
self.download_gccjit_if_needed()?;
298302
return Ok(());
299303
}
300-
if gcc_path.is_none() {
304+
let Some(gcc_path) = gcc_path else {
301305
return Err(format!("missing `gcc-path` value from `{}`", config_file.display()));
302-
}
303-
self.gcc_path = gcc_path;
306+
};
307+
println!(
308+
"GCC path retrieved from `{}`. Using `{}` as path for libgccjit",
309+
config_file.display(),
310+
gcc_path
311+
);
312+
self.gcc_path = Some(gcc_path);
304313
Ok(())
305314
}
306315

0 commit comments

Comments
 (0)