Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/tools/compiletest/src/runtest/run_make.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,8 @@ impl TestCx<'_> {
// to work correctly.
//
// See <https://github.com/rust-lang/rust/pull/122248> for more background.
let stage0_sysroot = build_root.join("stage0-sysroot");
if std::env::var_os("COMPILETEST_FORCE_STAGE0").is_some() {
let stage0_sysroot = build_root.join("stage0-sysroot");
rustc.arg("--sysroot").arg(&stage0_sysroot);
}

Expand All @@ -373,6 +373,15 @@ impl TestCx<'_> {
// Compute dynamic library search paths for recipes.
let recipe_dylib_search_paths = {
let mut paths = base_dylib_search_paths.clone();

// For stage 0, we need to explicitly include the stage0-sysroot libstd dylib.
// See <https://github.com/rust-lang/rust/issues/135373>.
if std::env::var_os("COMPILETEST_FORCE_STAGE0").is_some() {
paths.push(
stage0_sysroot.join("lib").join("rustlib").join(&self.config.host).join("lib"),
);
}

paths.push(support_lib_path.parent().unwrap().to_path_buf());
paths.push(stage_std_path.join("rustlib").join(&self.config.host).join("lib"));
paths
Expand Down
3 changes: 1 addition & 2 deletions src/tools/run-make-support/src/external_deps/rustdoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ impl Rustdoc {
#[track_caller]
pub fn new() -> Self {
let mut cmd = setup_common();
let target_rpath_dir = env_var_os("TARGET_RPATH_DIR");
cmd.arg(format!("-L{}", target_rpath_dir.to_string_lossy()));
cmd.arg("-L").arg(env_var_os("TARGET_RPATH_DIR"));
Self { cmd }
}

Expand Down
Loading