From 42c14ab3a803a2997436ccc65cffe0f19b0459fe Mon Sep 17 00:00:00 2001 From: Joseph Bingham Date: Fri, 15 Jul 2022 19:06:56 +0100 Subject: [PATCH 1/2] only run --all-targets in stage0 --- src/bootstrap/check.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs index 9196b78c513fe..ec17a7b4dfef2 100644 --- a/src/bootstrap/check.rs +++ b/src/bootstrap/check.rs @@ -140,7 +140,10 @@ impl Step for Std { cargo_subcommand(builder.kind), ); - cargo.arg("--all-targets"); + if compiler.stage == 0 { + cargo.arg("--all-targets"); + } + std_cargo(builder, target, compiler.stage, &mut cargo); // Explicitly pass -p for all dependencies krates -- this will force cargo From c5d661a01cd085c26417b90b57c86e01ea1009f3 Mon Sep 17 00:00:00 2001 From: Joseph Bingham Date: Mon, 1 Aug 2022 20:15:33 +0100 Subject: [PATCH 2/2] add comment --- src/bootstrap/check.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs index ec17a7b4dfef2..aa033d87c42c1 100644 --- a/src/bootstrap/check.rs +++ b/src/bootstrap/check.rs @@ -140,6 +140,9 @@ impl Step for Std { cargo_subcommand(builder.kind), ); + // If we're not in stage 0, tests and examples will fail to compile + // from `core` definitions being loaded from two different `libcore` + // .rmeta and .rlib files. if compiler.stage == 0 { cargo.arg("--all-targets"); }