@@ -3217,9 +3217,15 @@ impl Step for Bootstrap {
3217
3217
}
3218
3218
}
3219
3219
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.
3220
3226
#[ derive( Debug , Clone , PartialEq , Eq , Hash ) ]
3221
3227
pub struct TierCheck {
3222
- pub compiler : Compiler ,
3228
+ test_compiler : Compiler ,
3223
3229
}
3224
3230
3225
3231
impl Step for TierCheck {
@@ -3232,42 +3238,36 @@ impl Step for TierCheck {
3232
3238
}
3233
3239
3234
3240
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 ) } ) ;
3241
3243
}
3242
3244
3243
- /// Tests the Platform Support page in the rustc book.
3244
3245
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
+
3246
3248
let mut cargo = tool:: prepare_tool_cargo (
3247
3249
builder,
3248
- self . compiler ,
3249
- Mode :: ToolStd ,
3250
- self . compiler . host ,
3250
+ tool_build_compiler ,
3251
+ Mode :: ToolBootstrap ,
3252
+ tool_build_compiler . host ,
3251
3253
Kind :: Run ,
3252
3254
"src/tools/tier-check" ,
3253
3255
SourceType :: InTree ,
3254
3256
& [ ] ,
3255
3257
) ;
3256
3258
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 ) ) ;
3258
3260
if builder. is_verbose ( ) {
3259
3261
cargo. arg ( "--verbose" ) ;
3260
3262
}
3261
3263
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 ) ;
3269
3265
BootstrapCommand :: from ( cargo) . delay_failure ( ) . run ( builder) ;
3270
3266
}
3267
+
3268
+ fn metadata ( & self ) -> Option < StepMetadata > {
3269
+ Some ( StepMetadata :: test ( "tier-check" , self . test_compiler . host ) )
3270
+ }
3271
3271
}
3272
3272
3273
3273
#[ derive( Debug , Clone , PartialEq , Eq , Hash ) ]
0 commit comments