File tree 1 file changed +9
-4
lines changed
src/bootstrap/src/core/build_steps
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -1730,8 +1730,15 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
1730
1730
let is_rustdoc = suite. ends_with ( "rustdoc-ui" ) || suite. ends_with ( "rustdoc-js" ) ;
1731
1731
1732
1732
if mode == "run-make" {
1733
- let cargo = builder. ensure ( tool:: Cargo { compiler, target : compiler. host } ) ;
1734
- cmd. arg ( "--cargo-path" ) . arg ( cargo) ;
1733
+ let cargo_path = if builder. top_stage == 0 {
1734
+ // If we're using `--stage 0`, we should provide the bootstrap cargo.
1735
+ builder. initial_cargo . clone ( )
1736
+ } else {
1737
+ // We need to properly build cargo using the suitable stage compiler.
1738
+ builder. ensure ( tool:: Cargo { compiler, target : compiler. host } )
1739
+ } ;
1740
+
1741
+ cmd. arg ( "--cargo-path" ) . arg ( cargo_path) ;
1735
1742
}
1736
1743
1737
1744
// Avoid depending on rustdoc when we don't need it.
@@ -2088,8 +2095,6 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
2088
2095
cmd. arg ( "--rustfix-coverage" ) ;
2089
2096
}
2090
2097
2091
- cmd. env ( "BOOTSTRAP_CARGO" , & builder. initial_cargo ) ;
2092
-
2093
2098
cmd. arg ( "--channel" ) . arg ( & builder. config . channel ) ;
2094
2099
2095
2100
if !builder. config . omit_git_hash {
You can’t perform that action at this time.
0 commit comments