File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
src/bootstrap/src/core/config Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -683,14 +683,15 @@ impl Config {
683683 } ;
684684
685685 let initial_rustc = build_rustc. unwrap_or_else ( || {
686- let out = if cfg ! ( test) { Path :: new ( "../../build" ) . to_path_buf ( ) } else { out. clone ( ) } ;
687-
686+ let out = if cfg ! ( test) {
687+ std:: env:: current_dir ( ) . unwrap ( ) . ancestors ( ) . nth ( 2 ) . unwrap ( ) . join ( "build" )
688+ } else {
689+ out. clone ( )
690+ } ;
688691 download_beta_toolchain ( & dwn_ctx, & out) ;
692+ let target = if cfg ! ( test) { get_host_target ( ) } else { host_target } ;
689693
690- out. join ( if cfg ! ( test) { get_host_target ( ) } else { host_target } )
691- . join ( "stage0" )
692- . join ( "bin" )
693- . join ( exe ( "rustc" , host_target) )
694+ out. join ( target) . join ( "stage0" ) . join ( "bin" ) . join ( exe ( "rustc" , host_target) )
694695 } ) ;
695696
696697 let initial_sysroot = t ! ( PathBuf :: from_str(
You can’t perform that action at this time.
0 commit comments