about summary refs log tree commit diff
path: root/src/librustc_driver
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-01-19 09:03:27 +0100
committerGitHub <noreply@github.com>2019-01-19 09:03:27 +0100
commit64eb69b904513b8f277102e4c802527e718debdc (patch)
treedfce43133cbca3c923e24bbfa0874768d0650157 /src/librustc_driver
parentb941f290ac40c32aa7096dff8a2588b818cc79cb (diff)
parentb7cd24dd44eafa44797fdd4e418013d1ea0fd1db (diff)
downloadrust-64eb69b904513b8f277102e4c802527e718debdc.tar.gz
rust-64eb69b904513b8f277102e4c802527e718debdc.zip
Rollup merge of #57573 - Xanewok:querify-entry-fn, r=Zoxc
Querify `entry_fn`

Analogous to https://github.com/rust-lang/rust/pull/57570 but this will also require few fixups in Miri so I decided to separate that (and it seems [CI doesn't let us break tools anymore](https://github.com/rust-lang/rust/pull/57392#issuecomment-453801540)? Or was that because it was a rollup PR?)

r? @nikomatsakis
Diffstat (limited to 'src/librustc_driver')
-rw-r--r--src/librustc_driver/driver.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/librustc_driver/driver.rs b/src/librustc_driver/driver.rs
index aa7cb0c695c..396d20120a7 100644
--- a/src/librustc_driver/driver.rs
+++ b/src/librustc_driver/driver.rs
@@ -1149,6 +1149,7 @@ pub fn default_provide(providers: &mut ty::query::Providers) {
     rustc_passes::provide(providers);
     rustc_traits::provide(providers);
     middle::region::provide(providers);
+    middle::entry::provide(providers);
     cstore::provide(providers);
     lint::provide(providers);
 }
@@ -1183,10 +1184,6 @@ where
         rustc_incremental::load_query_result_cache(sess)
     });
 
-    time(sess, "looking for entry point", || {
-        middle::entry::find_entry_point(sess, &hir_map, name)
-    });
-
     let mut local_providers = ty::query::Providers::default();
     default_provide(&mut local_providers);
     codegen_backend.provide(&mut local_providers);
@@ -1216,6 +1213,10 @@ where
             // tcx available.
             time(sess, "dep graph tcx init", || rustc_incremental::dep_graph_tcx_init(tcx));
 
+            time(sess, "looking for entry point", || {
+                middle::entry::find_entry_point(tcx)
+            });
+
             time(sess, "looking for plugin registrar", || {
                 plugin::build::find_plugin_registrar(tcx)
             });