Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 9fd9e4f

Browse files
committed
Auto merge of rust-lang#138197 - Zalathar:assemble-cycle, r=<try>
(DO NOT MERGE) Investigating bootstrap cycle r? ghost try-job: aarch64-apple
2 parents f5a1ef7 + c59d219 commit 9fd9e4f

File tree

3 files changed

+10
-33
lines changed

3 files changed

+10
-33
lines changed

src/bootstrap/src/core/build_steps/compile.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -994,9 +994,7 @@ impl Step for Rustc {
994994
fn make_run(run: RunConfig<'_>) {
995995
let crates = run.cargo_crates_in_set();
996996
run.builder.ensure(Rustc {
997-
compiler: run
998-
.builder
999-
.compiler(run.builder.top_stage.saturating_sub(1), run.build_triple()),
997+
compiler: run.builder.compiler(run.builder.top_stage, run.build_triple()),
1000998
target: run.target,
1001999
crates,
10021000
});
@@ -1913,7 +1911,7 @@ impl Step for Assemble {
19131911

19141912
fn make_run(run: RunConfig<'_>) {
19151913
run.builder.ensure(Assemble {
1916-
target_compiler: run.builder.compiler(run.builder.top_stage, run.target),
1914+
target_compiler: run.builder.compiler(run.builder.top_stage + 1, run.target),
19171915
});
19181916
}
19191917

src/bootstrap/src/core/builder/tests.rs

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -652,20 +652,6 @@ mod dist {
652652
&["compiler/rustc".into(), "library".into()],
653653
);
654654

655-
assert_eq!(builder.config.stage, 2);
656-
657-
// `compile::Rustc` includes one-stage-off compiler information as the target compiler
658-
// artifacts get copied from there to the target stage sysroot.
659-
// For example, `stage2/bin/rustc` gets copied from the `stage1-rustc` build directory.
660-
assert_eq!(
661-
first(builder.cache.all::<compile::Rustc>()),
662-
&[
663-
rustc!(TEST_TRIPLE_1 => TEST_TRIPLE_1, stage = 0),
664-
rustc!(TEST_TRIPLE_1 => TEST_TRIPLE_1, stage = 1),
665-
rustc!(TEST_TRIPLE_1 => TEST_TRIPLE_2, stage = 1),
666-
]
667-
);
668-
669655
assert_eq!(
670656
first(builder.cache.all::<compile::Std>()),
671657
&[
@@ -677,22 +663,15 @@ mod dist {
677663
std!(TEST_TRIPLE_1 => TEST_TRIPLE_3, stage = 2),
678664
]
679665
);
680-
666+
assert_eq!(builder.cache.all::<compile::Assemble>().len(), 5);
681667
assert_eq!(
682-
first(builder.cache.all::<compile::Assemble>()),
668+
first(builder.cache.all::<compile::Rustc>()),
683669
&[
684-
compile::Assemble {
685-
target_compiler: Compiler::new(0, TargetSelection::from_user(TEST_TRIPLE_1),)
686-
},
687-
compile::Assemble {
688-
target_compiler: Compiler::new(1, TargetSelection::from_user(TEST_TRIPLE_1),)
689-
},
690-
compile::Assemble {
691-
target_compiler: Compiler::new(2, TargetSelection::from_user(TEST_TRIPLE_1),)
692-
},
693-
compile::Assemble {
694-
target_compiler: Compiler::new(2, TargetSelection::from_user(TEST_TRIPLE_2),)
695-
},
670+
rustc!(TEST_TRIPLE_1 => TEST_TRIPLE_1, stage = 0),
671+
rustc!(TEST_TRIPLE_1 => TEST_TRIPLE_1, stage = 1),
672+
rustc!(TEST_TRIPLE_1 => TEST_TRIPLE_1, stage = 2),
673+
rustc!(TEST_TRIPLE_1 => TEST_TRIPLE_2, stage = 1),
674+
rustc!(TEST_TRIPLE_1 => TEST_TRIPLE_2, stage = 2),
696675
]
697676
);
698677
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ revisions: blank bad
2-
//@ [blank] compile-flags: -Cinstrument-coverage=
2+
//@ [blank] compile-flags: -Cinstrument-coverage=_
33
//@ [bad] compile-flags: -Cinstrument-coverage=bad-value
44

55
fn main() {}

0 commit comments

Comments
 (0)