@@ -105,10 +105,15 @@ impl Step for Std {
105
105
cargo. arg ( "--lib" ) ;
106
106
}
107
107
108
- builder. info ( & format ! (
109
- "Checking stage{} library artifacts ({} -> {})" ,
110
- builder. top_stage, & compiler. host, target
111
- ) ) ;
108
+ let msg = if compiler. host == target {
109
+ format ! ( "Checking stage{} library artifacts ({target})" , builder. top_stage)
110
+ } else {
111
+ format ! (
112
+ "Checking stage{} library artifacts ({} -> {})" ,
113
+ builder. top_stage, & compiler. host, target
114
+ )
115
+ } ;
116
+ builder. info ( & msg) ;
112
117
run_cargo (
113
118
builder,
114
119
cargo,
@@ -162,10 +167,18 @@ impl Step for Std {
162
167
cargo. arg ( "-p" ) . arg ( krate. name ) ;
163
168
}
164
169
165
- builder. info ( & format ! (
166
- "Checking stage{} library test/bench/example targets ({} -> {})" ,
167
- builder. top_stage, & compiler. host, target
168
- ) ) ;
170
+ let msg = if compiler. host == target {
171
+ format ! (
172
+ "Checking stage{} library test/bench/example targets ({target})" ,
173
+ builder. top_stage
174
+ )
175
+ } else {
176
+ format ! (
177
+ "Checking stage{} library test/bench/example targets ({} -> {})" ,
178
+ builder. top_stage, & compiler. host, target
179
+ )
180
+ } ;
181
+ builder. info ( & msg) ;
169
182
run_cargo (
170
183
builder,
171
184
cargo,
@@ -239,10 +252,15 @@ impl Step for Rustc {
239
252
cargo. arg ( "-p" ) . arg ( krate. name ) ;
240
253
}
241
254
242
- builder. info ( & format ! (
243
- "Checking stage{} compiler artifacts ({} -> {})" ,
244
- builder. top_stage, & compiler. host, target
245
- ) ) ;
255
+ let msg = if compiler. host == target {
256
+ format ! ( "Checking stage{} compiler artifacts ({target})" , builder. top_stage)
257
+ } else {
258
+ format ! (
259
+ "Checking stage{} compiler artifacts ({} -> {})" ,
260
+ builder. top_stage, & compiler. host, target
261
+ )
262
+ } ;
263
+ builder. info ( & msg) ;
246
264
run_cargo (
247
265
builder,
248
266
cargo,
@@ -299,10 +317,15 @@ impl Step for CodegenBackend {
299
317
. arg ( builder. src . join ( format ! ( "compiler/rustc_codegen_{}/Cargo.toml" , backend) ) ) ;
300
318
rustc_cargo_env ( builder, & mut cargo, target) ;
301
319
302
- builder. info ( & format ! (
303
- "Checking stage{} {} artifacts ({} -> {})" ,
304
- builder. top_stage, backend, & compiler. host. triple, target. triple
305
- ) ) ;
320
+ let msg = if compiler. host == target {
321
+ format ! ( "Checking stage{} {} artifacts ({target})" , builder. top_stage, backend)
322
+ } else {
323
+ format ! (
324
+ "Checking stage{} {} library ({} -> {})" ,
325
+ builder. top_stage, backend, & compiler. host. triple, target. triple
326
+ )
327
+ } ;
328
+ builder. info ( & msg) ;
306
329
307
330
run_cargo (
308
331
builder,
@@ -362,10 +385,15 @@ impl Step for RustAnalyzer {
362
385
cargo. arg ( "--benches" ) ;
363
386
}
364
387
365
- builder. info ( & format ! (
366
- "Checking stage{} {} artifacts ({} -> {})" ,
367
- compiler. stage, "rust-analyzer" , & compiler. host. triple, target. triple
368
- ) ) ;
388
+ let msg = if compiler. host == target {
389
+ format ! ( "Checking stage{} {} artifacts ({target})" , compiler. stage, "rust-analyzer" )
390
+ } else {
391
+ format ! (
392
+ "Checking stage{} {} artifacts ({} -> {})" ,
393
+ compiler. stage, "rust-analyzer" , & compiler. host. triple, target. triple
394
+ )
395
+ } ;
396
+ builder. info ( & msg) ;
369
397
run_cargo (
370
398
builder,
371
399
cargo,
@@ -432,14 +460,18 @@ macro_rules! tool_check_step {
432
460
// NOTE: this doesn't enable lints for any other tools unless they explicitly add `#![warn(rustc::internal)]`
433
461
// See https://github.com/rust-lang/rust/pull/80573#issuecomment-754010776
434
462
cargo. rustflag( "-Zunstable-options" ) ;
435
-
436
- builder. info( & format!(
437
- "Checking stage{} {} artifacts ({} -> {})" ,
438
- builder. top_stage,
439
- stringify!( $name) . to_lowercase( ) ,
440
- & compiler. host. triple,
441
- target. triple
442
- ) ) ;
463
+ let msg = if compiler. host == target {
464
+ format!( "Checking stage{} {} artifacts ({target})" , builder. top_stage, stringify!( $name) . to_lowercase( ) )
465
+ } else {
466
+ format!(
467
+ "Checking stage{} {} artifacts ({} -> {})" ,
468
+ builder. top_stage,
469
+ stringify!( $name) . to_lowercase( ) ,
470
+ & compiler. host. triple,
471
+ target. triple
472
+ )
473
+ } ;
474
+ builder. info( & msg) ;
443
475
run_cargo(
444
476
builder,
445
477
cargo,
0 commit comments