Skip to content

Commit 03d9ec2

Browse files
committed
force compiling std from source if explicitly called
This allows the standard library to be compiled even with `download-rustc` enabled. Which means it's no longer a requirement to compile `rustc` in order to compile `std`. Signed-off-by: onur-ozkan <[email protected]>
1 parent 8c3a94a commit 03d9ec2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ impl Step for Std {
136136
compiler: run.builder.compiler(run.builder.top_stage, run.build_triple()),
137137
target: run.target,
138138
crates,
139-
force_recompile: false,
139+
// Force compiling from source as it was explicitly called with `x build library (or std/sysroot)`.
140+
force_recompile: !run.builder.paths.is_empty(),
140141
extra_rust_args: &[],
141142
is_for_mir_opt_tests: false,
142143
});

0 commit comments

Comments
 (0)