X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fbootstrap%2Fcheck.rs;h=4e1e8ef9dead812b380578eef085c175f458fc5c;hb=a9cefd04411611e72417ee2762979e300aac8749;hp=394bd8b4e282564b8dcfac19b99e50884d1aa3d3;hpb=76822a28780a9a93be04409e52c5df21663aab97;p=rust.git diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs index 394bd8b4e28..4e1e8ef9dea 100644 --- a/src/bootstrap/check.rs +++ b/src/bootstrap/check.rs @@ -140,7 +140,13 @@ fn run(self, builder: &Builder<'_>) { cargo_subcommand(builder.kind), ); - cargo.arg("--all-targets"); + // 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"); + } + std_cargo(builder, target, compiler.stage, &mut cargo); // Explicitly pass -p for all dependencies krates -- this will force cargo