Add compiler_for_std
This commit is contained in:
parent
31e900b78f
commit
edcdb80914
4 changed files with 13 additions and 3 deletions
|
|
@ -150,7 +150,7 @@ impl Step for Std {
|
|||
trace!(force_recompile);
|
||||
|
||||
run.builder.ensure(Std {
|
||||
build_compiler: run.builder.compiler(run.builder.top_stage, run.build_triple()),
|
||||
build_compiler: run.builder.compiler_for_std(run.builder.top_stage, run.target),
|
||||
target: run.target,
|
||||
crates,
|
||||
force_recompile,
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ impl Step for JsonDocs {
|
|||
|
||||
fn make_run(run: RunConfig<'_>) {
|
||||
run.builder.ensure(JsonDocs {
|
||||
build_compiler: run.builder.compiler(run.builder.top_stage, run.builder.host_target),
|
||||
build_compiler: run.builder.compiler_for_std(run.builder.top_stage, run.target),
|
||||
target: run.target,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -616,7 +616,9 @@ impl Step for Std {
|
|||
return;
|
||||
}
|
||||
run.builder.ensure(Std {
|
||||
build_compiler: run.builder.compiler(run.builder.top_stage, run.builder.host_target),
|
||||
build_compiler: run
|
||||
.builder
|
||||
.compiler_for_std(run.builder.top_stage, run.builder.host_target),
|
||||
target: run.target,
|
||||
format: if run.builder.config.cmd.json() {
|
||||
DocumentationFormat::Json
|
||||
|
|
|
|||
|
|
@ -1360,6 +1360,14 @@ impl<'a> Builder<'a> {
|
|||
self.ensure(compile::Assemble { target_compiler: Compiler::new(stage, host) })
|
||||
}
|
||||
|
||||
pub fn compiler_for_std(&self, stage: u32, target: TargetSelection) -> Compiler {
|
||||
if compile::Std::should_be_uplifted_from_stage_1(self, stage, target) {
|
||||
self.compiler(1, self.host_target)
|
||||
} else {
|
||||
self.compiler(stage, self.host_target)
|
||||
}
|
||||
}
|
||||
|
||||
/// Similar to `compiler`, except handles the full-bootstrap option to
|
||||
/// silently use the stage1 compiler instead of a stage2 compiler if one is
|
||||
/// requested.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue