@@ -446,13 +446,23 @@ impl Config {
446446 enable_bolt_settings : flags_enable_bolt_settings,
447447 skip_stage0_validation : flags_skip_stage0_validation,
448448 reproducible_artifact : flags_reproducible_artifact,
449- paths : mut flags_paths,
449+ paths : flags_paths,
450450 set : flags_set,
451- free_args : mut flags_free_args,
451+ free_args : flags_free_args,
452452 ci : flags_ci,
453453 skip_std_check_if_no_download_rustc : flags_skip_std_check_if_no_download_rustc,
454454 } = flags;
455455
456+ #[ cfg( feature = "tracing" ) ]
457+ span ! (
458+ target: "CONFIG_HANDLING" ,
459+ tracing:: Level :: TRACE ,
460+ "collecting paths and path exclusions" ,
461+ "flags.paths" = ?flags_paths,
462+ "flags.skip" = ?flags_skip,
463+ "flags.exclude" = ?flags_exclude
464+ ) ;
465+
456466 // First initialize the bare minimum that we need for further operation - source directory
457467 // and execution context.
458468 let mut config = Config :: default_opts ( ) ;
@@ -576,26 +586,13 @@ impl Config {
576586 }
577587 }
578588
579- #[ cfg( feature = "tracing" ) ]
580- span ! (
581- target: "CONFIG_HANDLING" ,
582- tracing:: Level :: TRACE ,
583- "collecting paths and path exclusions" ,
584- "flags.paths" = ?flags_paths,
585- "flags.skip" = ?flags_skip,
586- "flags.exclude" = ?flags_exclude
587- ) ;
588-
589- #[ cfg( feature = "tracing" ) ]
590- span ! (
591- target: "CONFIG_HANDLING" ,
592- tracing:: Level :: TRACE ,
593- "normalizing and combining `flag.skip`/`flag.exclude` paths" ,
594- "config.skip" = ?config. skip,
595- ) ;
589+ let mut paths: Vec < PathBuf > = flags_skip. into_iter ( ) . chain ( flags_exclude) . collect ( ) ;
590+ if let Some ( exclude) = exclude {
591+ paths. extend ( exclude) ;
592+ }
596593
597- // Set flags.
598- config. paths = std :: mem :: take ( & mut flags_paths) ;
594+ // Set config values based on flags.
595+ config. paths = flags_paths;
599596 config. include_default_paths = flags_include_default_paths;
600597 config. rustc_error_format = flags_rustc_error_format;
601598 config. json_output = flags_json_output;
@@ -608,7 +605,7 @@ impl Config {
608605 config. keep_stage = flags_keep_stage;
609606 config. keep_stage_std = flags_keep_stage_std;
610607 config. color = flags_color;
611- config. free_args = std :: mem :: take ( & mut flags_free_args) ;
608+ config. free_args = flags_free_args;
612609 config. llvm_profile_use = flags_llvm_profile_use;
613610 config. llvm_profile_generate = flags_llvm_profile_generate;
614611 config. enable_bolt_settings = flags_enable_bolt_settings;
@@ -632,12 +629,6 @@ impl Config {
632629
633630 config. change_id = toml. change_id . inner ;
634631
635- let mut paths: Vec < PathBuf > = flags_skip. into_iter ( ) . chain ( flags_exclude) . collect ( ) ;
636-
637- if let Some ( exclude) = exclude {
638- paths. extend ( exclude) ;
639- }
640-
641632 config. skip = paths
642633 . into_iter ( )
643634 . map ( |p| {
@@ -652,6 +643,14 @@ impl Config {
652643 } )
653644 . collect ( ) ;
654645
646+ #[ cfg( feature = "tracing" ) ]
647+ span ! (
648+ target: "CONFIG_HANDLING" ,
649+ tracing:: Level :: TRACE ,
650+ "normalizing and combining `flag.skip`/`flag.exclude` paths" ,
651+ "config.skip" = ?config. skip,
652+ ) ;
653+
655654 config. jobs = Some ( threads_from_config ( jobs. unwrap_or ( 0 ) ) ) ;
656655 if let Some ( build) = build {
657656 config. host_target = TargetSelection :: from_user ( & build) ;
0 commit comments