@@ -421,61 +421,6 @@ impl Step for RustAnalyzer {
421
421
}
422
422
}
423
423
424
- /// Compiletest is implicitly "checked" when it gets built in order to run tests,
425
- /// so this is mainly for people working on compiletest to run locally.
426
- #[ derive( Debug , Clone , PartialEq , Eq , Hash ) ]
427
- pub struct Compiletest {
428
- pub target : TargetSelection ,
429
- }
430
-
431
- impl Step for Compiletest {
432
- type Output = ( ) ;
433
- const ONLY_HOSTS : bool = true ;
434
- const DEFAULT : bool = false ;
435
-
436
- fn should_run ( run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
437
- run. path ( "src/tools/compiletest" )
438
- }
439
-
440
- fn make_run ( run : RunConfig < ' _ > ) {
441
- run. builder . ensure ( Compiletest { target : run. target } ) ;
442
- }
443
-
444
- fn run ( self , builder : & Builder < ' _ > ) {
445
- let mode = if builder. config . compiletest_use_stage0_libtest {
446
- Mode :: ToolBootstrap
447
- } else {
448
- Mode :: ToolStd
449
- } ;
450
- let build_compiler = prepare_compiler_for_check ( builder, self . target , mode) ;
451
-
452
- let mut cargo = prepare_tool_cargo (
453
- builder,
454
- build_compiler,
455
- mode,
456
- self . target ,
457
- builder. kind ,
458
- "src/tools/compiletest" ,
459
- SourceType :: InTree ,
460
- & [ ] ,
461
- ) ;
462
-
463
- cargo. allow_features ( COMPILETEST_ALLOW_FEATURES ) ;
464
-
465
- cargo. arg ( "--all-targets" ) ;
466
-
467
- let stamp = BuildStamp :: new ( & builder. cargo_out ( build_compiler, mode, self . target ) )
468
- . with_prefix ( "compiletest-check" ) ;
469
-
470
- let _guard = builder. msg_check ( "compiletest artifacts" , self . target , None ) ;
471
- run_cargo ( builder, cargo, builder. config . free_args . clone ( ) , & stamp, vec ! [ ] , true , false ) ;
472
- }
473
-
474
- fn metadata ( & self ) -> Option < StepMetadata > {
475
- Some ( StepMetadata :: check ( "compiletest" , self . target ) )
476
- }
477
- }
478
-
479
424
macro_rules! tool_check_step {
480
425
(
481
426
$name: ident {
@@ -630,3 +575,16 @@ tool_check_step!(CoverageDump {
630
575
mode: |_builder| Mode :: ToolBootstrap ,
631
576
default : false
632
577
} ) ;
578
+
579
+ // Compiletest is implicitly "checked" when it gets built in order to run tests,
580
+ // so this is mainly for people working on compiletest to run locally.
581
+ tool_check_step ! ( Compiletest {
582
+ path: "src/tools/compiletest" ,
583
+ mode: |builder: & Builder <' _>| if builder. config. compiletest_use_stage0_libtest {
584
+ Mode :: ToolBootstrap
585
+ } else {
586
+ Mode :: ToolStd
587
+ } ,
588
+ allow_features: COMPILETEST_ALLOW_FEATURES ,
589
+ default : false ,
590
+ } ) ;
0 commit comments