@@ -3540,31 +3540,16 @@ impl<'test> TestCx<'test> {
3540
3540
// │ └── <host_triple>/release/deps/ // <- deps
3541
3541
// ```
3542
3542
//
3543
- // There almost certainly is a better way to do this, but this seems to work for now.
3543
+ // FIXME(jieyouxu): there almost certainly is a better way to do this (specifically how the
3544
+ // support lib and its deps are organized, can't we copy them to the tools-bin dir as
3545
+ // well?), but this seems to work for now.
3544
3546
3545
- let support_lib_path = {
3546
- let mut p = build_root. clone ( ) ;
3547
- p. push ( format ! ( "{}-tools-bin" , stage) ) ;
3548
- p. push ( "librun_make_support.rlib" ) ;
3549
- p
3550
- } ;
3547
+ let stage_tools_bin = build_root. join ( format ! ( "{stage}-tools-bin" ) ) ;
3548
+ let support_lib_path = stage_tools_bin. join ( "librun_make_support.rlib" ) ;
3551
3549
3552
- let support_lib_deps = {
3553
- let mut p = build_root. clone ( ) ;
3554
- p. push ( format ! ( "{}-tools" , stage) ) ;
3555
- p. push ( & self . config . host ) ;
3556
- p. push ( "release" ) ;
3557
- p. push ( "deps" ) ;
3558
- p
3559
- } ;
3560
-
3561
- let support_lib_deps_deps = {
3562
- let mut p = build_root. clone ( ) ;
3563
- p. push ( format ! ( "{}-tools" , stage) ) ;
3564
- p. push ( "release" ) ;
3565
- p. push ( "deps" ) ;
3566
- p
3567
- } ;
3550
+ let stage_tools = build_root. join ( format ! ( "{stage}-tools" ) ) ;
3551
+ let support_lib_deps = stage_tools. join ( & self . config . host ) . join ( "release" ) . join ( "deps" ) ;
3552
+ let support_lib_deps_deps = stage_tools. join ( "release" ) . join ( "deps" ) ;
3568
3553
3569
3554
// To compile the recipe with rustc, we need to provide suitable dynamic library search
3570
3555
// paths to rustc. This includes both:
@@ -3628,13 +3613,7 @@ impl<'test> TestCx<'test> {
3628
3613
//
3629
3614
// See <https://github.com/rust-lang/rust/pull/122248> for more background.
3630
3615
if std:: env:: var_os ( "COMPILETEST_FORCE_STAGE0" ) . is_some ( ) {
3631
- let stage0_sysroot = {
3632
- let mut p = build_root. clone ( ) ;
3633
- p. push ( "stage0-sysroot" ) ;
3634
- p
3635
- } ;
3636
- debug ! ( ?stage0_sysroot) ;
3637
-
3616
+ let stage0_sysroot = build_root. join ( "stage0-sysroot" ) ;
3638
3617
rustc. arg ( "--sysroot" ) . arg ( & stage0_sysroot) ;
3639
3618
}
3640
3619
@@ -3648,12 +3627,7 @@ impl<'test> TestCx<'test> {
3648
3627
// provided through env vars.
3649
3628
3650
3629
// Compute stage-specific standard library paths.
3651
- let stage_std_path = {
3652
- let mut p = build_root. clone ( ) ;
3653
- p. push ( & stage) ;
3654
- p. push ( "lib" ) ;
3655
- p
3656
- } ;
3630
+ let stage_std_path = build_root. join ( & stage) . join ( "lib" ) ;
3657
3631
3658
3632
// Compute dynamic library search paths for recipes.
3659
3633
let recipe_dylib_search_paths = {
0 commit comments