Skip to content

Commit bc02a54

Browse files
committed
rename the dep-graph file to include crate ident
This way, multiple compilations can share the same work directory.
1 parent ef902a2 commit bc02a54

File tree

1 file changed

+7
-1
lines changed
  • src/librustc_incremental/persist

1 file changed

+7
-1
lines changed

src/librustc_incremental/persist/util.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
use rustc::middle::cstore::LOCAL_CRATE;
1112
use rustc::ty::TyCtxt;
1213

1314
use std::fs;
@@ -28,7 +29,12 @@ pub fn dep_graph_path(tcx: TyCtxt) -> Option<PathBuf> {
2829
}
2930
}
3031

31-
Some(incr_dir.join("dep_graph.rbml"))
32+
let crate_name = tcx.crate_name(LOCAL_CRATE);
33+
let crate_disambiguator = tcx.crate_disambiguator(LOCAL_CRATE);
34+
let file_name = format!("dep-graph-{}-{}.bin",
35+
crate_name,
36+
crate_disambiguator);
37+
Some(incr_dir.join(file_name))
3238
})
3339
}
3440

0 commit comments

Comments
 (0)