File tree 1 file changed +10
-1
lines changed
src/tools/compiletest/src/runtest
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -353,8 +353,8 @@ impl TestCx<'_> {
353
353
// to work correctly.
354
354
//
355
355
// See <https://github.com/rust-lang/rust/pull/122248> for more background.
356
+ let stage0_sysroot = build_root. join ( "stage0-sysroot" ) ;
356
357
if std:: env:: var_os ( "COMPILETEST_FORCE_STAGE0" ) . is_some ( ) {
357
- let stage0_sysroot = build_root. join ( "stage0-sysroot" ) ;
358
358
rustc. arg ( "--sysroot" ) . arg ( & stage0_sysroot) ;
359
359
}
360
360
@@ -373,6 +373,15 @@ impl TestCx<'_> {
373
373
// Compute dynamic library search paths for recipes.
374
374
let recipe_dylib_search_paths = {
375
375
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
+
376
385
paths. push ( support_lib_path. parent ( ) . unwrap ( ) . to_path_buf ( ) ) ;
377
386
paths. push ( stage_std_path. join ( "rustlib" ) . join ( & self . config . host ) . join ( "lib" ) ) ;
378
387
paths
You can’t perform that action at this time.
0 commit comments