Skip to content

Commit 196de90

Browse files
Cache incrementally-compiled crates as well
1 parent c5c5579 commit 196de90

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

collector/src/execute.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,13 @@ impl<'a> CargoProcess<'a> {
258258
}
259259

260260
fn run_rustc(&mut self) -> anyhow::Result<()> {
261+
log::info!(
262+
"run_rustc with incremental={}, run_kind={:?}, patch={:?}",
263+
self.incremental,
264+
self.processor_etc.as_ref().map(|v| v.1),
265+
self.processor_etc.as_ref().and_then(|v| v.3)
266+
);
267+
261268
loop {
262269
// Get the subcommand. If it's not `rustc` it must should be a
263270
// subcommand that itself invokes `rustc` (so that the `FAKE_RUSTC`
@@ -962,9 +969,14 @@ impl Benchmark {
962969
// Build everything, including all dependent crates, in a temp dir with
963970
// the first build kind we're building for. The intent is to cache build
964971
// dependencies at least between runs.
972+
//
973+
// Cache with both incremental and non-incremental.
965974
let prep_dir = self.make_temp_dir(&self.path)?;
966975
self.mk_cargo_process(compiler, prep_dir.path(), build_kinds[0])
967976
.run_rustc()?;
977+
self.mk_cargo_process(compiler, prep_dir.path(), build_kinds[0])
978+
.incremental(true)
979+
.run_rustc()?;
968980

969981
for &build_kind in build_kinds {
970982
eprintln!("Running {}: {:?} + {:?}", self.name, build_kind, run_kinds);

0 commit comments

Comments
 (0)