Skip to content

Commit 3357470

Browse files
authored
Rollup merge of #99293 - jo3bingham:issue-98720-fix, r=jyn514
only run --all-targets in stage0 for Std Repro'd the issue with `python3 x.py check --stage 1 library/std` and tested the fix with the same command. r? `@jyn514` I tried to implement [this solution](#98720 (comment)), but didn't have any luck. I don't think I fully understood what needed to be done. However, I would love to be mentored on it since it would be a more correct solution, and I can learn more about how bootstrap works.
2 parents 0629445 + c5d661a commit 3357470

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/bootstrap/check.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,13 @@ impl Step for Std {
140140
cargo_subcommand(builder.kind),
141141
);
142142

143-
cargo.arg("--all-targets");
143+
// If we're not in stage 0, tests and examples will fail to compile
144+
// from `core` definitions being loaded from two different `libcore`
145+
// .rmeta and .rlib files.
146+
if compiler.stage == 0 {
147+
cargo.arg("--all-targets");
148+
}
149+
144150
std_cargo(builder, target, compiler.stage, &mut cargo);
145151

146152
// Explicitly pass -p for all dependencies krates -- this will force cargo

0 commit comments

Comments
 (0)