@@ -653,6 +653,20 @@ mod dist {
653
653
& [ "compiler/rustc" . into ( ) , "library" . into ( ) ] ,
654
654
) ;
655
655
656
+ assert_eq ! ( builder. config. stage, 2 ) ;
657
+
658
+ // `compile::Rustc` includes one-stage-off compiler information as the target compiler
659
+ // artifacts get copied from there to the target stage sysroot.
660
+ // For example, `stage2/bin/rustc` gets copied from the `stage1-rustc` build directory.
661
+ assert_eq ! (
662
+ first( builder. cache. all:: <compile:: Rustc >( ) ) ,
663
+ & [
664
+ rustc!( TEST_TRIPLE_1 => TEST_TRIPLE_1 , stage = 0 ) ,
665
+ rustc!( TEST_TRIPLE_1 => TEST_TRIPLE_1 , stage = 1 ) ,
666
+ rustc!( TEST_TRIPLE_1 => TEST_TRIPLE_2 , stage = 1 ) ,
667
+ ]
668
+ ) ;
669
+
656
670
assert_eq ! (
657
671
first( builder. cache. all:: <compile:: Std >( ) ) ,
658
672
& [
@@ -664,13 +678,34 @@ mod dist {
664
678
std!( TEST_TRIPLE_1 => TEST_TRIPLE_3 , stage = 2 ) ,
665
679
]
666
680
) ;
667
- assert_eq ! ( builder . cache . all :: <compile :: Assemble > ( ) . len ( ) , 4 ) ;
681
+
668
682
assert_eq ! (
669
- first( builder. cache. all:: <compile:: Rustc >( ) ) ,
683
+ first( builder. cache. all:: <compile:: Assemble >( ) ) ,
670
684
& [
671
- rustc!( TEST_TRIPLE_1 => TEST_TRIPLE_1 , stage = 0 ) ,
672
- rustc!( TEST_TRIPLE_1 => TEST_TRIPLE_1 , stage = 1 ) ,
673
- rustc!( TEST_TRIPLE_1 => TEST_TRIPLE_2 , stage = 1 ) ,
685
+ compile:: Assemble {
686
+ target_compiler: Compiler {
687
+ host: TargetSelection :: from_user( TEST_TRIPLE_1 ) ,
688
+ stage: 0
689
+ }
690
+ } ,
691
+ compile:: Assemble {
692
+ target_compiler: Compiler {
693
+ host: TargetSelection :: from_user( TEST_TRIPLE_1 ) ,
694
+ stage: 1
695
+ }
696
+ } ,
697
+ compile:: Assemble {
698
+ target_compiler: Compiler {
699
+ host: TargetSelection :: from_user( TEST_TRIPLE_1 ) ,
700
+ stage: 2
701
+ }
702
+ } ,
703
+ compile:: Assemble {
704
+ target_compiler: Compiler {
705
+ host: TargetSelection :: from_user( TEST_TRIPLE_2 ) ,
706
+ stage: 2
707
+ }
708
+ } ,
674
709
]
675
710
) ;
676
711
}
0 commit comments