diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2016-04-06 12:01:40 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2016-05-18 10:11:35 -0400 |
| commit | bc02a54d12f8b03506ae8eda50a05784cf04b63f (patch) | |
| tree | e773c5d0d9f98a479bf7c3539e73e5daa976e0e2 | |
| parent | ef902a211be7c699daefafb515ef11d9d929687f (diff) | |
| download | rust-bc02a54d12f8b03506ae8eda50a05784cf04b63f.tar.gz rust-bc02a54d12f8b03506ae8eda50a05784cf04b63f.zip | |
rename the dep-graph file to include crate ident
This way, multiple compilations can share the same work directory.
| -rw-r--r-- | src/librustc_incremental/persist/util.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/librustc_incremental/persist/util.rs b/src/librustc_incremental/persist/util.rs index 8ebcbc0466f..754292ba383 100644 --- a/src/librustc_incremental/persist/util.rs +++ b/src/librustc_incremental/persist/util.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +use rustc::middle::cstore::LOCAL_CRATE; use rustc::ty::TyCtxt; use std::fs; @@ -28,7 +29,12 @@ pub fn dep_graph_path(tcx: TyCtxt) -> Option<PathBuf> { } } - Some(incr_dir.join("dep_graph.rbml")) + let crate_name = tcx.crate_name(LOCAL_CRATE); + let crate_disambiguator = tcx.crate_disambiguator(LOCAL_CRATE); + let file_name = format!("dep-graph-{}-{}.bin", + crate_name, + crate_disambiguator); + Some(incr_dir.join(file_name)) }) } |
