@@ -33,7 +33,8 @@ use std::sync::atomic::{AtomicI32, Ordering};
3333use std:: sync:: { Arc , Once } ;
3434
3535use miri:: {
36- BacktraceStyle , BorrowTrackerMethod , MiriConfig , ProvenanceMode , RetagFields , ValidationMode ,
36+ BacktraceStyle , BorrowTrackerMethod , MiriConfig , MiriEntryFnType , ProvenanceMode , RetagFields ,
37+ ValidationMode ,
3738} ;
3839use rustc_abi:: ExternAbi ;
3940use rustc_data_structures:: sync;
@@ -51,7 +52,7 @@ use rustc_middle::query::LocalCrate;
5152use rustc_middle:: traits:: { ObligationCause , ObligationCauseCode } ;
5253use rustc_middle:: ty:: { self , Ty , TyCtxt } ;
5354use rustc_middle:: util:: Providers ;
54- use rustc_session:: config:: { CrateType , EntryFnType , ErrorOutputType , OptLevel } ;
55+ use rustc_session:: config:: { CrateType , ErrorOutputType , OptLevel } ;
5556use rustc_session:: search_paths:: PathKind ;
5657use rustc_session:: { CtfeBacktrace , EarlyDiagCtxt } ;
5758use rustc_span:: def_id:: DefId ;
@@ -73,9 +74,9 @@ impl MiriCompilerCalls {
7374 }
7475}
7576
76- fn entry_fn ( tcx : TyCtxt < ' _ > ) -> ( DefId , EntryFnType ) {
77- if let Some ( entry_def ) = tcx. entry_fn ( ( ) ) {
78- return entry_def ;
77+ fn entry_fn ( tcx : TyCtxt < ' _ > ) -> ( DefId , MiriEntryFnType ) {
78+ if let Some ( ( def_id , entry_type ) ) = tcx. entry_fn ( ( ) ) {
79+ return ( def_id , MiriEntryFnType :: Rustc ( entry_type ) ) ;
7980 }
8081 // Look for a symbol in the local crate named `miri_start`, and treat that as the entry point.
8182 let sym = tcx. exported_symbols ( LOCAL_CRATE ) . iter ( ) . find_map ( |( sym, _) | {
@@ -102,7 +103,7 @@ fn entry_fn(tcx: TyCtxt<'_>) -> (DefId, EntryFnType) {
102103 . is_ok ( ) ;
103104
104105 if correct_func_sig {
105- ( * id, EntryFnType :: Start )
106+ ( * id, MiriEntryFnType :: MiriStart )
106107 } else {
107108 tcx. dcx ( ) . fatal (
108109 "`miri_start` must have the following signature:\n \
0 commit comments