File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
src/tools/compiletest/src/runtest Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -353,8 +353,8 @@ impl TestCx<'_> {
353353 // to work correctly.
354354 //
355355 // See <https://github.com/rust-lang/rust/pull/122248> for more background.
356+ let stage0_sysroot = build_root. join ( "stage0-sysroot" ) ;
356357 if std:: env:: var_os ( "COMPILETEST_FORCE_STAGE0" ) . is_some ( ) {
357- let stage0_sysroot = build_root. join ( "stage0-sysroot" ) ;
358358 rustc. arg ( "--sysroot" ) . arg ( & stage0_sysroot) ;
359359 }
360360
@@ -373,6 +373,15 @@ impl TestCx<'_> {
373373 // Compute dynamic library search paths for recipes.
374374 let recipe_dylib_search_paths = {
375375 let mut paths = base_dylib_search_paths. clone ( ) ;
376+
377+ // For stage 0, we need to explicitly include the stage0-sysroot libstd dylib.
378+ // See <https://github.com/rust-lang/rust/issues/135373>.
379+ if std:: env:: var_os ( "COMPILETEST_FORCE_STAGE0" ) . is_some ( ) {
380+ paths. push (
381+ stage0_sysroot. join ( "lib" ) . join ( "rustlib" ) . join ( & self . config . host ) . join ( "lib" ) ,
382+ ) ;
383+ }
384+
376385 paths. push ( support_lib_path. parent ( ) . unwrap ( ) . to_path_buf ( ) ) ;
377386 paths. push ( stage_std_path. join ( "rustlib" ) . join ( & self . config . host ) . join ( "lib" ) ) ;
378387 paths
You can’t perform that action at this time.
0 commit comments