@@ -32,7 +32,7 @@ fn configure_with_args(cmd: &[String], host: &[&str], target: &[&str]) -> Config
32
32
. join ( & thread:: current ( ) . name ( ) . unwrap_or ( "unknown" ) . replace ( ":" , "-" ) ) ;
33
33
t ! ( fs:: create_dir_all( & dir) ) ;
34
34
config. out = dir;
35
- config. build = TargetSelection :: from_user ( "A" ) ;
35
+ config. build = TargetSelection :: from_user ( "A-A " ) ;
36
36
config. hosts = host. iter ( ) . map ( |s| TargetSelection :: from_user ( s) ) . collect ( ) ;
37
37
config. targets = target. iter ( ) . map ( |s| TargetSelection :: from_user ( s) ) . collect ( ) ;
38
38
config
@@ -53,27 +53,27 @@ fn run_build(paths: &[PathBuf], config: Config) -> Cache {
53
53
fn check_cli < const N : usize > ( paths : [ & str ; N ] ) {
54
54
run_build (
55
55
& paths. map ( PathBuf :: from) ,
56
- configure_with_args ( & paths. map ( String :: from) , & [ "A" ] , & [ "A" ] ) ,
56
+ configure_with_args ( & paths. map ( String :: from) , & [ "A-A " ] , & [ "A- A" ] ) ,
57
57
) ;
58
58
}
59
59
60
60
macro_rules! std {
61
61
( $host: ident => $target: ident, stage = $stage: literal) => {
62
62
compile:: Std :: new(
63
- Compiler { host: TargetSelection :: from_user( stringify!( $host) ) , stage: $stage } ,
64
- TargetSelection :: from_user( stringify!( $target) ) ,
63
+ Compiler { host: TargetSelection :: from_user( concat! ( stringify!( $host) , "-" , stringify! ( $host ) ) ) , stage: $stage } ,
64
+ TargetSelection :: from_user( concat! ( stringify!( $target) , "-" , stringify! ( $target ) ) ) ,
65
65
)
66
66
} ;
67
67
}
68
68
69
69
macro_rules! doc_std {
70
70
( $host: ident => $target: ident, stage = $stage: literal) => { {
71
- let config = configure( "doc" , & [ "A" ] , & [ "A" ] ) ;
71
+ let config = configure( "doc" , & [ "A-A " ] , & [ "A- A" ] ) ;
72
72
let build = Build :: new( config) ;
73
73
let builder = Builder :: new( & build) ;
74
74
doc:: Std :: new(
75
75
$stage,
76
- TargetSelection :: from_user( stringify!( $target) ) ,
76
+ TargetSelection :: from_user( concat! ( stringify!( $target) , "-" , stringify! ( $target ) ) ) ,
77
77
& builder,
78
78
DocumentationFormat :: Html ,
79
79
)
@@ -83,8 +83,8 @@ macro_rules! doc_std {
83
83
macro_rules! rustc {
84
84
( $host: ident => $target: ident, stage = $stage: literal) => {
85
85
compile:: Rustc :: new(
86
- Compiler { host: TargetSelection :: from_user( stringify!( $host) ) , stage: $stage } ,
87
- TargetSelection :: from_user( stringify!( $target) ) ,
86
+ Compiler { host: TargetSelection :: from_user( concat! ( stringify!( $host) , "-" , stringify! ( $host ) ) ) , stage: $stage } ,
87
+ TargetSelection :: from_user( concat! ( stringify!( $target) , "-" , stringify! ( $target ) ) ) ,
88
88
)
89
89
} ;
90
90
}
@@ -117,7 +117,7 @@ fn test_intersection() {
117
117
118
118
#[ test]
119
119
fn validate_path_remap ( ) {
120
- let build = Build :: new ( configure ( "test" , & [ "A" ] , & [ "A" ] ) ) ;
120
+ let build = Build :: new ( configure ( "test" , & [ "A-A " ] , & [ "A- A" ] ) ) ;
121
121
122
122
PATH_REMAP
123
123
. iter ( )
@@ -130,7 +130,7 @@ fn validate_path_remap() {
130
130
131
131
#[ test]
132
132
fn test_exclude ( ) {
133
- let mut config = configure ( "test" , & [ "A" ] , & [ "A" ] ) ;
133
+ let mut config = configure ( "test" , & [ "A-A " ] , & [ "A- A" ] ) ;
134
134
config. skip = vec ! [ "src/tools/tidy" . into( ) ] ;
135
135
let cache = run_build ( & [ ] , config) ;
136
136
@@ -145,7 +145,7 @@ fn test_exclude() {
145
145
fn test_exclude_kind ( ) {
146
146
let path = PathBuf :: from ( "compiler/rustc_data_structures" ) ;
147
147
148
- let mut config = configure ( "test" , & [ "A" ] , & [ "A" ] ) ;
148
+ let mut config = configure ( "test" , & [ "A-A " ] , & [ "A- A" ] ) ;
149
149
// Ensure our test is valid, and `test::Rustc` would be run without the exclude.
150
150
assert ! ( run_build( & [ ] , config. clone( ) ) . contains:: <test:: CrateLibrustc >( ) ) ;
151
151
// Ensure tests for rustc are not skipped.
@@ -159,13 +159,13 @@ fn test_exclude_kind() {
159
159
#[ test]
160
160
fn alias_and_path_for_library ( ) {
161
161
let mut cache =
162
- run_build ( & [ "library" . into ( ) , "core" . into ( ) ] , configure ( "build" , & [ "A" ] , & [ "A" ] ) ) ;
162
+ run_build ( & [ "library" . into ( ) , "core" . into ( ) ] , configure ( "build" , & [ "A-A " ] , & [ "A- A" ] ) ) ;
163
163
assert_eq ! (
164
164
first( cache. all:: <compile:: Std >( ) ) ,
165
165
& [ std!( A => A , stage = 0 ) , std!( A => A , stage = 1 ) ]
166
166
) ;
167
167
168
- let mut cache = run_build ( & [ "library" . into ( ) , "core" . into ( ) ] , configure ( "doc" , & [ "A" ] , & [ "A" ] ) ) ;
168
+ let mut cache = run_build ( & [ "library" . into ( ) , "core" . into ( ) ] , configure ( "doc" , & [ "A-A " ] , & [ "A- A" ] ) ) ;
169
169
assert_eq ! ( first( cache. all:: <doc:: Std >( ) ) , & [ doc_std!( A => A , stage = 0 ) ] ) ;
170
170
}
171
171
@@ -177,9 +177,9 @@ mod defaults {
177
177
178
178
#[ test]
179
179
fn build_default ( ) {
180
- let mut cache = run_build ( & [ ] , configure ( "build" , & [ "A" ] , & [ "A" ] ) ) ;
180
+ let mut cache = run_build ( & [ ] , configure ( "build" , & [ "A-A " ] , & [ "A- A" ] ) ) ;
181
181
182
- let a = TargetSelection :: from_user ( "A" ) ;
182
+ let a = TargetSelection :: from_user ( "A-A " ) ;
183
183
assert_eq ! (
184
184
first( cache. all:: <compile:: Std >( ) ) ,
185
185
& [ std!( A => A , stage = 0 ) , std!( A => A , stage = 1 ) , ]
@@ -197,10 +197,10 @@ mod defaults {
197
197
198
198
#[ test]
199
199
fn build_stage_0 ( ) {
200
- let config = Config { stage : 0 , ..configure ( "build" , & [ "A" ] , & [ "A" ] ) } ;
200
+ let config = Config { stage : 0 , ..configure ( "build" , & [ "A-A " ] , & [ "A- A" ] ) } ;
201
201
let mut cache = run_build ( & [ ] , config) ;
202
202
203
- let a = TargetSelection :: from_user ( "A" ) ;
203
+ let a = TargetSelection :: from_user ( "A-A " ) ;
204
204
assert_eq ! ( first( cache. all:: <compile:: Std >( ) ) , & [ std!( A => A , stage = 0 ) ] ) ;
205
205
assert ! ( !cache. all:: <compile:: Assemble >( ) . is_empty( ) ) ;
206
206
assert_eq ! (
@@ -214,11 +214,11 @@ mod defaults {
214
214
215
215
#[ test]
216
216
fn build_cross_compile ( ) {
217
- let config = Config { stage : 1 , ..configure ( "build" , & [ "A" , "B" ] , & [ "A" , "B" ] ) } ;
217
+ let config = Config { stage : 1 , ..configure ( "build" , & [ "A-A " , "B-B " ] , & [ "A-A " , "B- B" ] ) } ;
218
218
let mut cache = run_build ( & [ ] , config) ;
219
219
220
- let a = TargetSelection :: from_user ( "A" ) ;
221
- let b = TargetSelection :: from_user ( "B" ) ;
220
+ let a = TargetSelection :: from_user ( "A-A " ) ;
221
+ let b = TargetSelection :: from_user ( "B-B " ) ;
222
222
223
223
// Ideally, this build wouldn't actually have `target: a`
224
224
// rustdoc/rustcc/std here (the user only requested a host=B build, so
@@ -257,11 +257,11 @@ mod defaults {
257
257
258
258
#[ test]
259
259
fn doc_default ( ) {
260
- let mut config = configure ( "doc" , & [ "A" ] , & [ "A" ] ) ;
260
+ let mut config = configure ( "doc" , & [ "A-A " ] , & [ "A- A" ] ) ;
261
261
config. compiler_docs = true ;
262
262
config. cmd = Subcommand :: Doc { open : false , json : false } ;
263
263
let mut cache = run_build ( & [ ] , config) ;
264
- let a = TargetSelection :: from_user ( "A" ) ;
264
+ let a = TargetSelection :: from_user ( "A-A " ) ;
265
265
266
266
// error_index_generator uses stage 0 to share rustdoc artifacts with the
267
267
// rustdoc tool.
@@ -291,9 +291,9 @@ mod dist {
291
291
292
292
#[ test]
293
293
fn dist_baseline ( ) {
294
- let mut cache = run_build ( & [ ] , configure ( & [ "A" ] , & [ "A" ] ) ) ;
294
+ let mut cache = run_build ( & [ ] , configure ( & [ "A-A " ] , & [ "A- A" ] ) ) ;
295
295
296
- let a = TargetSelection :: from_user ( "A" ) ;
296
+ let a = TargetSelection :: from_user ( "A-A " ) ;
297
297
298
298
assert_eq ! ( first( cache. all:: <dist:: Docs >( ) ) , & [ dist:: Docs { host: a } , ] ) ;
299
299
assert_eq ! ( first( cache. all:: <dist:: Mingw >( ) ) , & [ dist:: Mingw { host: a } , ] ) ;
@@ -315,10 +315,10 @@ mod dist {
315
315
316
316
#[ test]
317
317
fn dist_with_targets ( ) {
318
- let mut cache = run_build ( & [ ] , configure ( & [ "A" ] , & [ "A" , "B" ] ) ) ;
318
+ let mut cache = run_build ( & [ ] , configure ( & [ "A-A " ] , & [ "A-A " , "B- B" ] ) ) ;
319
319
320
- let a = TargetSelection :: from_user ( "A" ) ;
321
- let b = TargetSelection :: from_user ( "B" ) ;
320
+ let a = TargetSelection :: from_user ( "A-A " ) ;
321
+ let b = TargetSelection :: from_user ( "B-B " ) ;
322
322
323
323
assert_eq ! (
324
324
first( cache. all:: <dist:: Docs >( ) ) ,
@@ -344,10 +344,10 @@ mod dist {
344
344
345
345
#[ test]
346
346
fn dist_with_hosts ( ) {
347
- let mut cache = run_build ( & [ ] , configure ( & [ "A" , "B" ] , & [ "A" , "B" ] ) ) ;
347
+ let mut cache = run_build ( & [ ] , configure ( & [ "A-A " , "B-B " ] , & [ "A-A " , "B- B" ] ) ) ;
348
348
349
- let a = TargetSelection :: from_user ( "A" ) ;
350
- let b = TargetSelection :: from_user ( "B" ) ;
349
+ let a = TargetSelection :: from_user ( "A-A " ) ;
350
+ let b = TargetSelection :: from_user ( "B-B " ) ;
351
351
352
352
assert_eq ! (
353
353
first( cache. all:: <dist:: Docs >( ) ) ,
@@ -386,8 +386,8 @@ mod dist {
386
386
387
387
#[ test]
388
388
fn dist_only_cross_host ( ) {
389
- let b = TargetSelection :: from_user ( "B" ) ;
390
- let mut config = configure ( & [ "A" , "B" ] , & [ "A" , "B" ] ) ;
389
+ let b = TargetSelection :: from_user ( "B-B " ) ;
390
+ let mut config = configure ( & [ "A-A " , "B-B " ] , & [ "A-A " , "B- B" ] ) ;
391
391
config. docs = false ;
392
392
config. extended = true ;
393
393
config. hosts = vec ! [ b] ;
@@ -405,11 +405,11 @@ mod dist {
405
405
406
406
#[ test]
407
407
fn dist_with_targets_and_hosts ( ) {
408
- let mut cache = run_build ( & [ ] , configure ( & [ "A" , "B" ] , & [ "A" , "B" , "C" ] ) ) ;
408
+ let mut cache = run_build ( & [ ] , configure ( & [ "A-A " , "B-B " ] , & [ "A-A " , "B-B " , "C- C" ] ) ) ;
409
409
410
- let a = TargetSelection :: from_user ( "A" ) ;
411
- let b = TargetSelection :: from_user ( "B" ) ;
412
- let c = TargetSelection :: from_user ( "C" ) ;
410
+ let a = TargetSelection :: from_user ( "A-A " ) ;
411
+ let b = TargetSelection :: from_user ( "B-B " ) ;
412
+ let c = TargetSelection :: from_user ( "C-C " ) ;
413
413
414
414
assert_eq ! (
415
415
first( cache. all:: <dist:: Docs >( ) ) ,
@@ -439,11 +439,11 @@ mod dist {
439
439
440
440
#[ test]
441
441
fn dist_with_empty_host ( ) {
442
- let config = configure ( & [ ] , & [ "C" ] ) ;
442
+ let config = configure ( & [ ] , & [ "C-C " ] ) ;
443
443
let mut cache = run_build ( & [ ] , config) ;
444
444
445
- let a = TargetSelection :: from_user ( "A" ) ;
446
- let c = TargetSelection :: from_user ( "C" ) ;
445
+ let a = TargetSelection :: from_user ( "A-A " ) ;
446
+ let c = TargetSelection :: from_user ( "C-C " ) ;
447
447
448
448
assert_eq ! ( first( cache. all:: <dist:: Docs >( ) ) , & [ dist:: Docs { host: c } , ] ) ;
449
449
assert_eq ! ( first( cache. all:: <dist:: Mingw >( ) ) , & [ dist:: Mingw { host: c } , ] ) ;
@@ -455,10 +455,10 @@ mod dist {
455
455
456
456
#[ test]
457
457
fn dist_with_same_targets_and_hosts ( ) {
458
- let mut cache = run_build ( & [ ] , configure ( & [ "A" , "B" ] , & [ "A" , "B" ] ) ) ;
458
+ let mut cache = run_build ( & [ ] , configure ( & [ "A-A " , "B-B " ] , & [ "A-A " , "B- B" ] ) ) ;
459
459
460
- let a = TargetSelection :: from_user ( "A" ) ;
461
- let b = TargetSelection :: from_user ( "B" ) ;
460
+ let a = TargetSelection :: from_user ( "A-A " ) ;
461
+ let b = TargetSelection :: from_user ( "B-B " ) ;
462
462
463
463
assert_eq ! (
464
464
first( cache. all:: <dist:: Docs >( ) ) ,
@@ -506,7 +506,7 @@ mod dist {
506
506
507
507
#[ test]
508
508
fn build_all ( ) {
509
- let build = Build :: new ( configure ( & [ "A" , "B" ] , & [ "A" , "B" , "C" ] ) ) ;
509
+ let build = Build :: new ( configure ( & [ "A-A " , "B-B " ] , & [ "A-A " , "B-B " , "C- C" ] ) ) ;
510
510
let mut builder = Builder :: new ( & build) ;
511
511
builder. run_step_descriptions (
512
512
& Builder :: get_step_descriptions ( Kind :: Build ) ,
@@ -539,29 +539,29 @@ mod dist {
539
539
540
540
#[ test]
541
541
fn llvm_out_behaviour ( ) {
542
- let mut config = configure ( & [ "A" ] , & [ "B" ] ) ;
542
+ let mut config = configure ( & [ "A-A " ] , & [ "B- B" ] ) ;
543
543
config. llvm_from_ci = true ;
544
544
let build = Build :: new ( config. clone ( ) ) ;
545
545
546
- let target = TargetSelection :: from_user ( "A" ) ;
546
+ let target = TargetSelection :: from_user ( "A-A " ) ;
547
547
assert ! ( build. llvm_out( target) . ends_with( "ci-llvm" ) ) ;
548
- let target = TargetSelection :: from_user ( "B" ) ;
548
+ let target = TargetSelection :: from_user ( "B-B " ) ;
549
549
assert ! ( build. llvm_out( target) . ends_with( "llvm" ) ) ;
550
550
551
551
config. llvm_from_ci = false ;
552
552
let build = Build :: new ( config. clone ( ) ) ;
553
- let target = TargetSelection :: from_user ( "A" ) ;
553
+ let target = TargetSelection :: from_user ( "A-A " ) ;
554
554
assert ! ( build. llvm_out( target) . ends_with( "llvm" ) ) ;
555
555
}
556
556
557
557
#[ test]
558
558
fn build_with_empty_host ( ) {
559
- let config = configure ( & [ ] , & [ "C" ] ) ;
559
+ let config = configure ( & [ ] , & [ "C-C " ] ) ;
560
560
let build = Build :: new ( config) ;
561
561
let mut builder = Builder :: new ( & build) ;
562
562
builder. run_step_descriptions ( & Builder :: get_step_descriptions ( Kind :: Build ) , & [ ] ) ;
563
563
564
- let a = TargetSelection :: from_user ( "A" ) ;
564
+ let a = TargetSelection :: from_user ( "A-A " ) ;
565
565
566
566
assert_eq ! (
567
567
first( builder. cache. all:: <compile:: Std >( ) ) ,
@@ -583,7 +583,7 @@ mod dist {
583
583
584
584
#[ test]
585
585
fn test_with_no_doc_stage0 ( ) {
586
- let mut config = configure ( & [ "A" ] , & [ "A" ] ) ;
586
+ let mut config = configure ( & [ "A-A " ] , & [ "A- A" ] ) ;
587
587
config. stage = 0 ;
588
588
config. paths = vec ! [ "library/std" . into( ) ] ;
589
589
config. cmd = Subcommand :: Test {
@@ -605,7 +605,7 @@ mod dist {
605
605
let build = Build :: new ( config) ;
606
606
let mut builder = Builder :: new ( & build) ;
607
607
608
- let host = TargetSelection :: from_user ( "A" ) ;
608
+ let host = TargetSelection :: from_user ( "A-A " ) ;
609
609
610
610
builder. run_step_descriptions (
611
611
& [ StepDescription :: from :: < test:: Crate > ( Kind :: Test ) ] ,
@@ -627,13 +627,13 @@ mod dist {
627
627
628
628
#[ test]
629
629
fn doc_ci ( ) {
630
- let mut config = configure ( & [ "A" ] , & [ "A" ] ) ;
630
+ let mut config = configure ( & [ "A-A " ] , & [ "A- A" ] ) ;
631
631
config. compiler_docs = true ;
632
632
config. cmd = Subcommand :: Doc { open : false , json : false } ;
633
633
let build = Build :: new ( config) ;
634
634
let mut builder = Builder :: new ( & build) ;
635
635
builder. run_step_descriptions ( & Builder :: get_step_descriptions ( Kind :: Doc ) , & [ ] ) ;
636
- let a = TargetSelection :: from_user ( "A" ) ;
636
+ let a = TargetSelection :: from_user ( "A-A " ) ;
637
637
638
638
// error_index_generator uses stage 1 to share rustdoc artifacts with the
639
639
// rustdoc tool.
@@ -656,7 +656,7 @@ mod dist {
656
656
#[ test]
657
657
fn test_docs ( ) {
658
658
// Behavior of `x.py test` doing various documentation tests.
659
- let mut config = configure ( & [ "A" ] , & [ "A" ] ) ;
659
+ let mut config = configure ( & [ "A-A " ] , & [ "A- A" ] ) ;
660
660
config. cmd = Subcommand :: Test {
661
661
test_args : vec ! [ ] ,
662
662
rustc_args : vec ! [ ] ,
@@ -678,7 +678,7 @@ mod dist {
678
678
let mut builder = Builder :: new ( & build) ;
679
679
680
680
builder. run_step_descriptions ( & Builder :: get_step_descriptions ( Kind :: Test ) , & [ ] ) ;
681
- let a = TargetSelection :: from_user ( "A" ) ;
681
+ let a = TargetSelection :: from_user ( "A-A " ) ;
682
682
683
683
// error_index_generator uses stage 1 to share rustdoc artifacts with the
684
684
// rustdoc tool.
0 commit comments