@@ -1648,16 +1648,17 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
16481648 // bootstrap compiler.
16491649 // NOTE: Only stage 1 is special cased because we need the rustc_private artifacts to match the
16501650 // running compiler in stage 2 when plugins run.
1651- let stage_id = if suite == "ui-fulldeps" && compiler. stage == 1 {
1652- // At stage 0 (stage - 1) we are using the beta compiler. Using `self.target` can lead finding
1653- // an incorrect compiler path on cross-targets, as the stage 0 beta compiler is always equal
1654- // to `build.build` in the configuration.
1651+ let ( stage , stage_id) = if suite == "ui-fulldeps" && compiler. stage == 1 {
1652+ // At stage 0 (stage - 1) we are using the beta compiler. Using `self.target` can lead
1653+ // finding an incorrect compiler path on cross-targets, as the stage 0 beta compiler is
1654+ // always equal to `build.build` in the configuration.
16551655 let build = builder. build . build ;
1656-
16571656 compiler = builder. compiler ( compiler. stage - 1 , build) ;
1658- format ! ( "stage{}-{}" , compiler. stage + 1 , build)
1657+ let test_stage = compiler. stage + 1 ;
1658+ ( test_stage, format ! ( "stage{}-{}" , test_stage, build) )
16591659 } else {
1660- format ! ( "stage{}-{}" , compiler. stage, target)
1660+ let stage = compiler. stage ;
1661+ ( stage, format ! ( "stage{}-{}" , stage, target) )
16611662 } ;
16621663
16631664 if suite. ends_with ( "fulldeps" ) {
@@ -1699,6 +1700,9 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
16991700 // compiletest currently has... a lot of arguments, so let's just pass all
17001701 // of them!
17011702
1703+ cmd. arg ( "--stage" ) . arg ( stage. to_string ( ) ) ;
1704+ cmd. arg ( "--stage-id" ) . arg ( stage_id) ;
1705+
17021706 cmd. arg ( "--compile-lib-path" ) . arg ( builder. rustc_libdir ( compiler) ) ;
17031707 cmd. arg ( "--run-lib-path" ) . arg ( builder. sysroot_target_libdir ( compiler, target) ) ;
17041708 cmd. arg ( "--rustc-path" ) . arg ( builder. rustc ( compiler) ) ;
@@ -1767,8 +1771,9 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
17671771 } else {
17681772 builder. sysroot ( compiler) . to_path_buf ( )
17691773 } ;
1774+
17701775 cmd. arg ( "--sysroot-base" ) . arg ( sysroot) ;
1771- cmd . arg ( "--stage-id" ) . arg ( stage_id ) ;
1776+
17721777 cmd. arg ( "--suite" ) . arg ( suite) ;
17731778 cmd. arg ( "--mode" ) . arg ( mode) ;
17741779 cmd. arg ( "--target" ) . arg ( target. rustc_target_arg ( ) ) ;
0 commit comments