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 @@ -679,14 +679,15 @@ impl Config {
679679 } ;
680680
681681 let initial_rustc = build_rustc. unwrap_or_else ( || {
682- let out = if cfg ! ( test) { Path :: new ( "../../build" ) . to_path_buf ( ) } else { out. clone ( ) } ;
683-
682+ let out = if cfg ! ( test) {
683+ std:: env:: current_dir ( ) . unwrap ( ) . ancestors ( ) . nth ( 2 ) . unwrap ( ) . join ( "build" )
684+ } else {
685+ out. clone ( )
686+ } ;
684687 download_beta_toolchain ( & dwn_ctx, & out) ;
688+ let target = if cfg ! ( test) { get_host_target ( ) } else { host_target } ;
685689
686- out. join ( if cfg ! ( test) { get_host_target ( ) } else { host_target } )
687- . join ( "stage0" )
688- . join ( "bin" )
689- . join ( exe ( "rustc" , host_target) )
690+ out. join ( target) . join ( "stage0" ) . join ( "bin" ) . join ( exe ( "rustc" , host_target) )
690691 } ) ;
691692
692693 let initial_sysroot = t ! ( PathBuf :: from_str(
You can’t perform that action at this time.
0 commit comments