@@ -12,8 +12,8 @@ use crate::{
1212 InterpResult , InterpError , InterpCx , StackPopCleanup , struct_error,
1313 Scalar , Tag , Pointer , FnVal ,
1414 MemoryExtra , MiriMemoryKind , Evaluator , TlsEvalContextExt , HelpersEvalContextExt ,
15+ ShimsEnvVars ,
1516} ;
16- use crate :: shims:: env:: EnvVars ;
1717
1818/// Configuration needed to spawn a Miri instance.
1919#[ derive( Clone ) ]
@@ -40,6 +40,8 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(
4040 MemoryExtra :: new ( StdRng :: seed_from_u64 ( config. seed . unwrap_or ( 0 ) ) , config. validate ) ,
4141 ) ;
4242
43+ ShimsEnvVars :: init ( config. communicate , & mut ecx, & tcx) ;
44+
4345 let main_instance = ty:: Instance :: mono ( ecx. tcx . tcx , main_id) ;
4446 let main_mir = ecx. load_mir ( main_instance. def ) ?;
4547
@@ -164,10 +166,6 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(
164166
165167 assert ! ( args. next( ) . is_none( ) , "start lang item has more arguments than expected" ) ;
166168
167- if config. communicate {
168- EnvVars :: init ( & mut ecx, & tcx) ;
169- }
170-
171169 Ok ( ecx)
172170}
173171
0 commit comments