Skip to content

Commit 646e0d3

Browse files
authored
Rollup merge of #103347 - RalfJung:rustc-src, r=Mark-Simulacrum
bootstrap: also create rustc-src component in sysroot Fixes rust-lang/rust-analyzer#12926
2 parents 28a1baf + bdc4acb commit 646e0d3

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
@@ -1177,6 +1177,20 @@ impl Step for Sysroot {
11771177
);
11781178
}
11791179
}
1180+
// Same for the rustc-src component.
1181+
let sysroot_lib_rustlib_rustcsrc = sysroot.join("lib/rustlib/rustc-src");
1182+
t!(fs::create_dir_all(&sysroot_lib_rustlib_rustcsrc));
1183+
let sysroot_lib_rustlib_rustcsrc_rust = sysroot_lib_rustlib_rustcsrc.join("rust");
1184+
if let Err(e) =
1185+
symlink_dir(&builder.config, &builder.src, &sysroot_lib_rustlib_rustcsrc_rust)
1186+
{
1187+
eprintln!(
1188+
"warning: creating symbolic link `{}` to `{}` failed with {}",
1189+
sysroot_lib_rustlib_rustcsrc_rust.display(),
1190+
builder.src.display(),
1191+
e,
1192+
);
1193+
}
11801194

11811195
INTERNER.intern_path(sysroot)
11821196
}

0 commit comments

Comments
 (0)