@@ -3248,9 +3248,15 @@ impl Step for Bootstrap {
32483248 }
32493249}
32503250
3251+ fn get_compiler_to_test ( builder : & Builder < ' _ > , target : TargetSelection ) -> Compiler {
3252+ builder. compiler ( builder. top_stage , target)
3253+ }
3254+
3255+ /// Tests the Platform Support page in the rustc book.
3256+ /// `test_compiler` is used to query the actual targets that are checked.
32513257#[ derive( Debug , Clone , PartialEq , Eq , Hash ) ]
32523258pub struct TierCheck {
3253- pub compiler : Compiler ,
3259+ test_compiler : Compiler ,
32543260}
32553261
32563262impl Step for TierCheck {
@@ -3263,42 +3269,36 @@ impl Step for TierCheck {
32633269 }
32643270
32653271 fn make_run ( run : RunConfig < ' _ > ) {
3266- let compiler = run. builder . compiler_for (
3267- run. builder . top_stage ,
3268- run. builder . build . host_target ,
3269- run. target ,
3270- ) ;
3271- run. builder . ensure ( TierCheck { compiler } ) ;
3272+ run. builder
3273+ . ensure ( TierCheck { test_compiler : get_compiler_to_test ( run. builder , run. target ) } ) ;
32723274 }
32733275
3274- /// Tests the Platform Support page in the rustc book.
32753276 fn run ( self , builder : & Builder < ' _ > ) {
3276- builder. std ( self . compiler , self . compiler . host ) ;
3277+ let tool_build_compiler = builder. compiler ( 0 , builder. host_target ) ;
3278+
32773279 let mut cargo = tool:: prepare_tool_cargo (
32783280 builder,
3279- self . compiler ,
3280- Mode :: ToolStd ,
3281- self . compiler . host ,
3281+ tool_build_compiler ,
3282+ Mode :: ToolBootstrap ,
3283+ tool_build_compiler . host ,
32823284 Kind :: Run ,
32833285 "src/tools/tier-check" ,
32843286 SourceType :: InTree ,
32853287 & [ ] ,
32863288 ) ;
32873289 cargo. arg ( builder. src . join ( "src/doc/rustc/src/platform-support.md" ) ) ;
3288- cargo. arg ( builder. rustc ( self . compiler ) ) ;
3290+ cargo. arg ( builder. rustc ( self . test_compiler ) ) ;
32893291 if builder. is_verbose ( ) {
32903292 cargo. arg ( "--verbose" ) ;
32913293 }
32923294
3293- let _guard = builder. msg (
3294- Kind :: Test ,
3295- "platform support check" ,
3296- None ,
3297- self . compiler ,
3298- self . compiler . host ,
3299- ) ;
3295+ let _guard = builder. msg_test ( "platform support check" , self . test_compiler ) ;
33003296 BootstrapCommand :: from ( cargo) . delay_failure ( ) . run ( builder) ;
33013297 }
3298+
3299+ fn metadata ( & self ) -> Option < StepMetadata > {
3300+ Some ( StepMetadata :: test ( "tier-check" , self . test_compiler . host ) )
3301+ }
33023302}
33033303
33043304#[ derive( Debug , Clone , PartialEq , Eq , Hash ) ]
0 commit comments