File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -320,12 +320,16 @@ impl ConfigInfo {
320320 ) -> Result < ( ) , String > {
321321 env. insert ( "CARGO_INCREMENTAL" . to_string ( ) , "0" . to_string ( ) ) ;
322322
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- ) ;
323+ let gcc_path = if !use_system_gcc {
324+ if self . gcc_path . is_none ( ) {
325+ self . setup_gcc_path ( ) ?;
326+ }
327+ self . gcc_path . clone ( ) . expect (
328+ "The config module should have emitted an error if the GCC path wasn't provided" ,
329+ )
330+ } else {
331+ String :: new ( )
332+ } ;
329333 env. insert ( "GCC_PATH" . to_string ( ) , gcc_path. clone ( ) ) ;
330334
331335 if self . cargo_target_dir . is_empty ( ) {
You can’t perform that action at this time.
0 commit comments