Skip to content

Commit de86ce1

Browse files
committed
use better default stage for check::Std when stage isn't explicit
Signed-off-by: onur-ozkan <work@onurozkan.dev>
1 parent 9505178 commit de86ce1

File tree

1 file changed

+8
-2
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+8
-2
lines changed

src/bootstrap/src/core/build_steps/check.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,16 @@ impl Step for Std {
6666
fn run(self, builder: &Builder<'_>) {
6767
builder.require_submodule("library/stdarch", None);
6868

69+
let stage = if builder.config.is_explicit_stage() || builder.top_stage >= 1 {
70+
builder.top_stage
71+
} else {
72+
1
73+
};
74+
6975
let target = self.target;
70-
let compiler = builder.compiler(builder.top_stage, builder.config.build);
76+
let compiler = builder.compiler(stage, builder.config.build);
7177

72-
if builder.top_stage == 0 {
78+
if stage == 0 {
7379
let mut is_explicitly_called =
7480
builder.paths.iter().any(|p| p.starts_with("library") || p.starts_with("std"));
7581

0 commit comments

Comments
 (0)