Skip to content

Commit bdc4acb

Browse files
committed
bootstrap: also create rustc-src component in sysroot
1 parent b1ab3b7 commit bdc4acb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/bootstrap/compile.rs

+14
Original file line numberDiff line numberDiff line change
@@ -1155,6 +1155,20 @@ impl Step for Sysroot {
11551155
);
11561156
}
11571157
}
1158+
// Same for the rustc-src component.
1159+
let sysroot_lib_rustlib_rustcsrc = sysroot.join("lib/rustlib/rustc-src");
1160+
t!(fs::create_dir_all(&sysroot_lib_rustlib_rustcsrc));
1161+
let sysroot_lib_rustlib_rustcsrc_rust = sysroot_lib_rustlib_rustcsrc.join("rust");
1162+
if let Err(e) =
1163+
symlink_dir(&builder.config, &builder.src, &sysroot_lib_rustlib_rustcsrc_rust)
1164+
{
1165+
eprintln!(
1166+
"warning: creating symbolic link `{}` to `{}` failed with {}",
1167+
sysroot_lib_rustlib_rustcsrc_rust.display(),
1168+
builder.src.display(),
1169+
e,
1170+
);
1171+
}
11581172

11591173
INTERNER.intern_path(sysroot)
11601174
}

0 commit comments

Comments
 (0)