@@ -445,51 +445,13 @@ bootstrap_tool!(
445445 WasmComponentLd , "src/tools/wasm-component-ld" , "wasm-component-ld" , is_unstable_tool = true , allow_features = "min_specialization" ;
446446 UnicodeTableGenerator , "src/tools/unicode-table-generator" , "unicode-table-generator" ;
447447 FeaturesStatusDump , "src/tools/features-status-dump" , "features-status-dump" ;
448+ OptimizedDist , "src/tools/opt-dist" , "opt-dist" , submodules = & [ "src/tools/rustc-perf" ] ;
448449) ;
449450
450451/// These are the submodules that are required for rustbook to work due to
451452/// depending on mdbook plugins.
452453pub static SUBMODULES_FOR_RUSTBOOK : & [ & str ] = & [ "src/doc/book" , "src/doc/reference" ] ;
453454
454- #[ derive( Debug , Clone , Hash , PartialEq , Eq ) ]
455- pub struct OptimizedDist {
456- pub compiler : Compiler ,
457- pub target : TargetSelection ,
458- }
459-
460- impl Step for OptimizedDist {
461- type Output = ToolBuildResult ;
462-
463- fn should_run ( run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
464- run. path ( "src/tools/opt-dist" )
465- }
466-
467- fn make_run ( run : RunConfig < ' _ > ) {
468- run. builder . ensure ( OptimizedDist {
469- compiler : run. builder . compiler ( 0 , run. builder . config . build ) ,
470- target : run. target ,
471- } ) ;
472- }
473-
474- fn run ( self , builder : & Builder < ' _ > ) -> ToolBuildResult {
475- // We need to ensure the rustc-perf submodule is initialized when building opt-dist since
476- // the tool requires it to be in place to run.
477- builder. require_submodule ( "src/tools/rustc-perf" , None ) ;
478-
479- builder. ensure ( ToolBuild {
480- compiler : self . compiler ,
481- target : self . target ,
482- tool : "opt-dist" ,
483- mode : Mode :: ToolBootstrap ,
484- path : "src/tools/opt-dist" ,
485- source_type : SourceType :: InTree ,
486- extra_features : Vec :: new ( ) ,
487- allow_features : "" ,
488- cargo_args : Vec :: new ( ) ,
489- } )
490- }
491- }
492-
493455/// The [rustc-perf](https://github.com/rust-lang/rustc-perf) benchmark suite, which is added
494456/// as a submodule at `src/tools/rustc-perf`.
495457#[ derive( Debug , Clone , Hash , PartialEq , Eq ) ]
0 commit comments