Rollup merge of #129942 - onur-ozkan:building-rustc-tools, r=Kobzol

copy rustc rustlib artifacts from ci-rustc

We recently (since https://github.com/rust-lang/rust/pull/129311) had an issue because some rustlib files were missing (like: "error[E0463]: can't find crate for rustc_ast") when building tools that rely on rustc. This patch fixes that by copying those files as required.

r? Kobzol

Blocker for https://github.com/rust-lang/rust/pull/122709
This commit is contained in:
Matthias Krüger 2024-09-05 19:43:49 +02:00 committed by GitHub
commit 95c580d653
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -931,7 +931,12 @@ fn run(self, builder: &Builder<'_>) -> u32 {
// NOTE: the ABI of the beta compiler is different from the ABI of the downloaded compiler,
// so its artifacts can't be reused.
if builder.download_rustc() && compiler.stage != 0 {
builder.ensure(Sysroot { compiler, force_recompile: false });
let sysroot = builder.ensure(Sysroot { compiler, force_recompile: false });
cp_rustc_component_to_ci_sysroot(
builder,
&sysroot,
builder.config.ci_rustc_dev_contents(),
);
return compiler.stage;
}