File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
src/bootstrap/src/core/build_steps Expand file tree Collapse file tree 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
17301730 let is_rustdoc = suite. ends_with ( "rustdoc-ui" ) || suite. ends_with ( "rustdoc-js" ) ;
17311731
17321732 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) ;
17351742 }
17361743
17371744 // 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
20882095 cmd. arg ( "--rustfix-coverage" ) ;
20892096 }
20902097
2091- cmd. env ( "BOOTSTRAP_CARGO" , & builder. initial_cargo ) ;
2092-
20932098 cmd. arg ( "--channel" ) . arg ( & builder. config . channel ) ;
20942099
20952100 if !builder. config . omit_git_hash {
You can’t perform that action at this time.
0 commit comments