diff options
| author | Ralf Jung <post@ralfj.de> | 2022-10-21 15:13:12 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2022-10-21 17:07:27 +0200 |
| commit | bdc4acb7bfc17955b9cdc04efbe5a4e89d94755e (patch) | |
| tree | eed9d23ab34a9b9a456e68f51d0298495f0d93b1 /src/bootstrap | |
| parent | b1ab3b738ac718da74cd4aa0bb7f362d0adbdf84 (diff) | |
| download | rust-bdc4acb7bfc17955b9cdc04efbe5a4e89d94755e.tar.gz rust-bdc4acb7bfc17955b9cdc04efbe5a4e89d94755e.zip | |
bootstrap: also create rustc-src component in sysroot
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/compile.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 4ccdabe4bb6..4ec4f071944 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -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) } |
