@@ -3217,9 +3217,15 @@ impl Step for Bootstrap {
32173217 }
32183218}
32193219
3220+ fn get_compiler_to_test ( builder : & Builder < ' _ > , target : TargetSelection ) -> Compiler {
3221+ builder. compiler ( builder. top_stage , target)
3222+ }
3223+
3224+ /// Tests the Platform Support page in the rustc book.
3225+ /// `test_compiler` is used to query the actual targets that are checked.
32203226#[ derive( Debug , Clone , PartialEq , Eq , Hash ) ]
32213227pub struct TierCheck {
3222- pub compiler : Compiler ,
3228+ test_compiler : Compiler ,
32233229}
32243230
32253231impl Step for TierCheck {
@@ -3232,42 +3238,36 @@ impl Step for TierCheck {
32323238 }
32333239
32343240 fn make_run ( run : RunConfig < ' _ > ) {
3235- let compiler = run. builder . compiler_for (
3236- run. builder . top_stage ,
3237- run. builder . build . host_target ,
3238- run. target ,
3239- ) ;
3240- run. builder . ensure ( TierCheck { compiler } ) ;
3241+ run. builder
3242+ . ensure ( TierCheck { test_compiler : get_compiler_to_test ( run. builder , run. target ) } ) ;
32413243 }
32423244
3243- /// Tests the Platform Support page in the rustc book.
32443245 fn run ( self , builder : & Builder < ' _ > ) {
3245- builder. std ( self . compiler , self . compiler . host ) ;
3246+ let tool_build_compiler = builder. compiler ( 0 , builder. host_target ) ;
3247+
32463248 let mut cargo = tool:: prepare_tool_cargo (
32473249 builder,
3248- self . compiler ,
3249- Mode :: ToolStd ,
3250- self . compiler . host ,
3250+ tool_build_compiler ,
3251+ Mode :: ToolBootstrap ,
3252+ tool_build_compiler . host ,
32513253 Kind :: Run ,
32523254 "src/tools/tier-check" ,
32533255 SourceType :: InTree ,
32543256 & [ ] ,
32553257 ) ;
32563258 cargo. arg ( builder. src . join ( "src/doc/rustc/src/platform-support.md" ) ) ;
3257- cargo. arg ( builder. rustc ( self . compiler ) ) ;
3259+ cargo. arg ( builder. rustc ( self . test_compiler ) ) ;
32583260 if builder. is_verbose ( ) {
32593261 cargo. arg ( "--verbose" ) ;
32603262 }
32613263
3262- let _guard = builder. msg (
3263- Kind :: Test ,
3264- "platform support check" ,
3265- None ,
3266- self . compiler ,
3267- self . compiler . host ,
3268- ) ;
3264+ let _guard = builder. msg_test ( "platform support check" , self . test_compiler ) ;
32693265 BootstrapCommand :: from ( cargo) . delay_failure ( ) . run ( builder) ;
32703266 }
3267+
3268+ fn metadata ( & self ) -> Option < StepMetadata > {
3269+ Some ( StepMetadata :: test ( "tier-check" , self . test_compiler . host ) )
3270+ }
32713271}
32723272
32733273#[ derive( Debug , Clone , PartialEq , Eq , Hash ) ]
0 commit comments