From 882a9684f9bc94afa7c97fdb5724511cd04e16fc Mon Sep 17 00:00:00 2001 From: John Kåre Alsaker Date: Sun, 14 May 2023 21:53:05 +0200 Subject: Specialize query execution for incremental and non-incremental --- compiler/rustc_interface/src/passes.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compiler/rustc_interface') diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index d3af01474b8..6fd95003072 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -691,6 +691,8 @@ pub fn create_global_ctxt<'tcx>( callback(sess, &mut local_providers, &mut extern_providers); } + let incremental = dep_graph.is_fully_enabled(); + sess.time("setup_global_ctxt", || { gcx_cell.get_or_init(move || { TyCtxt::create_global_ctxt( @@ -705,6 +707,7 @@ pub fn create_global_ctxt<'tcx>( local_providers, extern_providers, query_result_on_disk_cache, + incremental, ), ) }) -- cgit 1.4.1-3-g733a5