@@ -433,61 +433,6 @@ impl Step for RustAnalyzer {
433433 }
434434}
435435
436- /// Compiletest is implicitly "checked" when it gets built in order to run tests,
437- /// so this is mainly for people working on compiletest to run locally.
438- #[ derive( Debug , Clone , PartialEq , Eq , Hash ) ]
439- pub struct Compiletest {
440- pub target : TargetSelection ,
441- }
442-
443- impl Step for Compiletest {
444- type Output = ( ) ;
445- const ONLY_HOSTS : bool = true ;
446- const DEFAULT : bool = false ;
447-
448- fn should_run ( run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
449- run. path ( "src/tools/compiletest" )
450- }
451-
452- fn make_run ( run : RunConfig < ' _ > ) {
453- run. builder . ensure ( Compiletest { target : run. target } ) ;
454- }
455-
456- fn run ( self , builder : & Builder < ' _ > ) {
457- let mode = if builder. config . compiletest_use_stage0_libtest {
458- Mode :: ToolBootstrap
459- } else {
460- Mode :: ToolStd
461- } ;
462- let build_compiler = prepare_compiler_for_check ( builder, self . target , mode) ;
463-
464- let mut cargo = prepare_tool_cargo (
465- builder,
466- build_compiler,
467- mode,
468- self . target ,
469- builder. kind ,
470- "src/tools/compiletest" ,
471- SourceType :: InTree ,
472- & [ ] ,
473- ) ;
474-
475- cargo. allow_features ( COMPILETEST_ALLOW_FEATURES ) ;
476-
477- cargo. arg ( "--all-targets" ) ;
478-
479- let stamp = BuildStamp :: new ( & builder. cargo_out ( build_compiler, mode, self . target ) )
480- . with_prefix ( "compiletest-check" ) ;
481-
482- let _guard = builder. msg_check ( "compiletest artifacts" , self . target , None ) ;
483- run_cargo ( builder, cargo, builder. config . free_args . clone ( ) , & stamp, vec ! [ ] , true , false ) ;
484- }
485-
486- fn metadata ( & self ) -> Option < StepMetadata > {
487- Some ( StepMetadata :: check ( "compiletest" , self . target ) )
488- }
489- }
490-
491436macro_rules! tool_check_step {
492437 (
493438 $name: ident {
@@ -642,3 +587,16 @@ tool_check_step!(CoverageDump {
642587 mode: |_builder| Mode :: ToolBootstrap ,
643588 default : false
644589} ) ;
590+
591+ // Compiletest is implicitly "checked" when it gets built in order to run tests,
592+ // so this is mainly for people working on compiletest to run locally.
593+ tool_check_step ! ( Compiletest {
594+ path: "src/tools/compiletest" ,
595+ mode: |builder: & Builder <' _>| if builder. config. compiletest_use_stage0_libtest {
596+ Mode :: ToolBootstrap
597+ } else {
598+ Mode :: ToolStd
599+ } ,
600+ allow_features: COMPILETEST_ALLOW_FEATURES ,
601+ default : false ,
602+ } ) ;
0 commit comments