]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_interface/src/queries.rs
Auto merge of #83663 - AngelicosPhosphoros:simplify_binary_and_to_get_better_asm...
[rust.git] / compiler / rustc_interface / src / queries.rs
index 9c38d2b91ab31b5569d89af76849ebb448e733e4..01853eab530dad437b644270e2f5086354aa7391 100644 (file)
@@ -207,7 +207,13 @@ pub fn dep_graph(&self) -> Result<&Query<DepGraph>> {
                                 })
                                 .open(self.session())
                         });
-                    DepGraph::new(prev_graph, prev_work_products)
+
+                    rustc_incremental::build_dep_graph(
+                        self.session(),
+                        prev_graph,
+                        prev_work_products,
+                    )
+                    .unwrap_or_else(DepGraph::new_disabled)
                 }
             })
         })
@@ -435,6 +441,9 @@ pub fn enter<F, T>(&self, f: F) -> T
             if self.session().opts.debugging_opts.query_stats {
                 gcx.enter(rustc_query_impl::print_stats);
             }
+
+            self.session()
+                .time("serialize_dep_graph", || gcx.enter(rustc_incremental::save_dep_graph));
         }
 
         _timer = Some(self.session().timer("free_global_ctxt"));