Skip to content

Commit

Permalink
bootstrap: also create rustc-src component in sysroot
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Oct 21, 2022
1 parent b1ab3b7 commit bdc4acb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1155,6 +1155,20 @@ impl Step for Sysroot {
);
}
}
// Same for the rustc-src component.
let sysroot_lib_rustlib_rustcsrc = sysroot.join("lib/rustlib/rustc-src");
t!(fs::create_dir_all(&sysroot_lib_rustlib_rustcsrc));
let sysroot_lib_rustlib_rustcsrc_rust = sysroot_lib_rustlib_rustcsrc.join("rust");
if let Err(e) =
symlink_dir(&builder.config, &builder.src, &sysroot_lib_rustlib_rustcsrc_rust)
{
eprintln!(
"warning: creating symbolic link `{}` to `{}` failed with {}",
sysroot_lib_rustlib_rustcsrc_rust.display(),
builder.src.display(),
e,
);
}

INTERNER.intern_path(sysroot)
}
Expand Down

0 comments on commit bdc4acb

Please sign in to comment.