diff options
| author | Michael Woerister <michaelwoerister@posteo> | 2017-11-15 15:31:59 +0100 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo> | 2017-11-15 15:36:00 +0100 |
| commit | 2f50e626e1e0ccd1a5eff407c92e87c987f405e6 (patch) | |
| tree | 6b30b30a1870d2b5b398e9793ee64a91e04f06dd /src | |
| parent | 13582c6b58bc42fee3d94808b281f34a25fc237a (diff) | |
| download | rust-2f50e626e1e0ccd1a5eff407c92e87c987f405e6.tar.gz rust-2f50e626e1e0ccd1a5eff407c92e87c987f405e6.zip | |
incr.comp.: Only save and load query result cache when -Zincremental-queries is specified.
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_incremental/persist/load.rs | 3 | ||||
| -rw-r--r-- | src/librustc_incremental/persist/save.rs | 12 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/librustc_incremental/persist/load.rs b/src/librustc_incremental/persist/load.rs index 44111e8af09..e4bc6b7339e 100644 --- a/src/librustc_incremental/persist/load.rs +++ b/src/librustc_incremental/persist/load.rs @@ -202,7 +202,8 @@ pub fn load_dep_graph(sess: &Session) -> PreviousDepGraph { } pub fn load_query_result_cache<'sess>(sess: &'sess Session) -> OnDiskCache<'sess> { - if sess.opts.incremental.is_none() { + if sess.opts.incremental.is_none() || + !sess.opts.debugging_opts.incremental_queries { return OnDiskCache::new_empty(sess.codemap()); } diff --git a/src/librustc_incremental/persist/save.rs b/src/librustc_incremental/persist/save.rs index 711550c27d1..63038f1b93a 100644 --- a/src/librustc_incremental/persist/save.rs +++ b/src/librustc_incremental/persist/save.rs @@ -69,11 +69,13 @@ pub fn save_dep_graph<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, |e| encode_query_cache(tcx, e)); }); - time(sess.time_passes(), "persist dep-graph", || { - save_in(sess, - dep_graph_path(sess), - |e| encode_dep_graph(tcx, e)); - }); + if tcx.sess.opts.debugging_opts.incremental_queries { + time(sess.time_passes(), "persist dep-graph", || { + save_in(sess, + dep_graph_path(sess), + |e| encode_dep_graph(tcx, e)); + }); + } dirty_clean::check_dirty_clean_annotations(tcx); dirty_clean::check_dirty_clean_metadata(tcx, |
