Skip to content

Commit

Permalink
Correct the timestamp for CodegenBackend check
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Apr 18, 2018
1 parent b53468f commit 49b6773
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/bootstrap/check.rs
Expand Up @@ -186,13 +186,10 @@ impl Step for CodegenBackend {
_ => panic!("unknown backend: {}", self.backend),
}

let tmp_stamp = build.cargo_out(compiler, Mode::Librustc, target)
.join(".tmp.stamp");

let _folder = build.fold_output(|| format!("stage{}-rustc_trans", compiler.stage));
run_cargo(build,
cargo.arg("--features").arg(features),
&tmp_stamp,
&codegen_backend_stamp(build, compiler, target, self.backend),
true);
}
}
Expand Down Expand Up @@ -254,3 +251,13 @@ pub fn libtest_stamp(builder: &Builder, compiler: Compiler, target: Interned<Str
pub fn librustc_stamp(builder: &Builder, compiler: Compiler, target: Interned<String>) -> PathBuf {
builder.cargo_out(compiler, Mode::Librustc, target).join(".librustc-check.stamp")
}

/// Cargo's output path for librustc_trans in a given stage, compiled by a particular
/// compiler for the specified target and backend.
fn codegen_backend_stamp(build: &Build,
compiler: Compiler,
target: Interned<String>,
backend: Interned<String>) -> PathBuf {
build.cargo_out(compiler, Mode::Librustc, target)
.join(format!(".librustc_trans-{}-check.stamp", backend))
}
2 changes: 2 additions & 0 deletions src/bootstrap/compile.rs
Expand Up @@ -795,6 +795,8 @@ pub fn librustc_stamp(builder: &Builder, compiler: Compiler, target: Interned<St
builder.cargo_out(compiler, Mode::Librustc, target).join(".librustc.stamp")
}

/// Cargo's output path for librustc_trans in a given stage, compiled by a particular
/// compiler for the specified target and backend.
fn codegen_backend_stamp(builder: &Builder,
compiler: Compiler,
target: Interned<String>,
Expand Down

0 comments on commit 49b6773

Please sign in to comment.