We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5491581 + 12e73ae commit 9f33f84Copy full SHA for 9f33f84
build_system/src/config.rs
@@ -320,12 +320,16 @@ impl ConfigInfo {
320
) -> Result<(), String> {
321
env.insert("CARGO_INCREMENTAL".to_string(), "0".to_string());
322
323
- if self.gcc_path.is_none() && !use_system_gcc {
324
- self.setup_gcc_path()?;
325
- }
326
- let gcc_path = self.gcc_path.clone().expect(
327
- "The config module should have emitted an error if the GCC path wasn't provided",
328
- );
+ let gcc_path = if !use_system_gcc {
+ if self.gcc_path.is_none() {
+ self.setup_gcc_path()?;
+ }
+ self.gcc_path.clone().expect(
+ "The config module should have emitted an error if the GCC path wasn't provided",
329
+ )
330
+ } else {
331
+ String::new()
332
+ };
333
env.insert("GCC_PATH".to_string(), gcc_path.clone());
334
335
if self.cargo_target_dir.is_empty() {
0 commit comments