Skip to content

Commit

Permalink
save dev state
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <work@onurozkan.dev>
  • Loading branch information
onur-ozkan committed Jan 17, 2024
1 parent 341f0a1 commit 03e4209
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/bootstrap/src/core/build_steps/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,8 @@ impl Step for Rustc {
}

let compiler_to_use = builder.compiler_for(compiler.stage, compiler.host, target);
if compiler_to_use != compiler {
if compiler_to_use != compiler
{
builder.ensure(Rustc::new(compiler_to_use, target));
let msg = if compiler_to_use.host == target {
format!(
Expand Down Expand Up @@ -1604,6 +1605,7 @@ impl Step for Sysroot {

#[derive(Debug, Copy, PartialOrd, Ord, Clone, PartialEq, Eq, Hash)]
pub struct Assemble {
pub host: TargetSelection,
/// The compiler which we will produce in this step. Assemble itself will
/// take care of ensuring that the necessary prerequisites to do so exist,
/// that is, this target can be a stage2 compiler and Assemble will build
Expand All @@ -1621,6 +1623,7 @@ impl Step for Assemble {

fn make_run(run: RunConfig<'_>) {
run.builder.ensure(Assemble {
host: run.builder.config.build,
target_compiler: run.builder.compiler(run.builder.top_stage + 1, run.target),
});
}
Expand Down Expand Up @@ -1652,10 +1655,7 @@ impl Step for Assemble {
// only assume that we can run `build` artifacts, which means that to
// produce some other architecture compiler we need to start from
// `build` to get there.
//
// FIXME: It may be faster if we build just a stage 1 compiler and then
// use that to bootstrap this compiler forward.
let build_compiler = builder.compiler(target_compiler.stage - 1, builder.config.build);
let build_compiler = builder.compiler_for(target_compiler.stage - 1, self.target_compiler.host, self.target_compiler.host);

// If we're downloading a compiler from CI, we can use the same compiler for all stages other than 0.
if builder.download_rustc() {
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/src/core/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,7 @@ impl<'a> Builder<'a> {
/// obtained through this function, since it ensures that they are valid
/// (i.e., built and assembled).
pub fn compiler(&self, stage: u32, host: TargetSelection) -> Compiler {
self.ensure(compile::Assemble { target_compiler: Compiler { stage, host } })
self.ensure(compile::Assemble { host, target_compiler: Compiler { stage, host } })
}

/// Similar to `compiler`, except handles the full-bootstrap option to
Expand Down

0 comments on commit 03e4209

Please sign in to comment.