improve check::Std handling
Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
parent
c5adf58599
commit
613eceb80e
1 changed files with 9 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
|||
//! Implementation of compiling the compiler and standard library, in "check"-based modes.
|
||||
|
||||
use crate::core::build_steps::compile;
|
||||
use crate::core::build_steps::compile::{
|
||||
add_to_sysroot, run_cargo, rustc_cargo, rustc_cargo_env, std_cargo, std_crates_for_run_make,
|
||||
};
|
||||
|
|
@ -45,10 +46,12 @@ impl Step for Std {
|
|||
const DEFAULT: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let stage = run.builder.top_stage;
|
||||
run.crate_or_deps("sysroot")
|
||||
.crate_or_deps("coretests")
|
||||
.crate_or_deps("alloctests")
|
||||
.path("library")
|
||||
.default_condition(stage != 0)
|
||||
}
|
||||
|
||||
fn make_run(run: RunConfig<'_>) {
|
||||
|
|
@ -62,6 +65,12 @@ impl Step for Std {
|
|||
let target = self.target;
|
||||
let compiler = builder.compiler(builder.top_stage, builder.config.build);
|
||||
|
||||
if builder.top_stage == 0 {
|
||||
// Reuse the beta compiler's libstd
|
||||
builder.ensure(compile::Std::new(compiler, target));
|
||||
return;
|
||||
}
|
||||
|
||||
let mut cargo = builder::Cargo::new(
|
||||
builder,
|
||||
compiler,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue