commit
4f6f264c30
2
miri
2
miri
@ -45,7 +45,7 @@ fi
|
||||
# We set the rpath so that Miri finds the private rustc libraries it needs.
|
||||
# We enable debug-assertions to get tracing.
|
||||
# We enable line-only debuginfo for backtraces.
|
||||
export RUSTFLAGS="-C link-args=-Wl,-rpath,$LIBDIR -C debug-assertions -C debuginfo=1"
|
||||
export RUSTFLAGS="-C link-args=-Wl,-rpath,$LIBDIR -C debug-assertions -C debuginfo=1 $RUSTC_EXTRA_FLAGS"
|
||||
|
||||
## Helper functions
|
||||
|
||||
|
@ -40,7 +40,7 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(
|
||||
MemoryExtra::new(StdRng::seed_from_u64(config.seed.unwrap_or(0)), config.validate),
|
||||
);
|
||||
// Complete initialization.
|
||||
EnvVars::init(&mut ecx, config.communicate);
|
||||
EnvVars::init(&mut ecx);
|
||||
|
||||
// Setup first stack-frame
|
||||
let main_instance = ty::Instance::mono(ecx.tcx.tcx, main_id);
|
||||
|
@ -13,9 +13,8 @@ pub struct EnvVars {
|
||||
impl EnvVars {
|
||||
pub(crate) fn init<'mir, 'tcx>(
|
||||
ecx: &mut InterpCx<'mir, 'tcx, Evaluator<'tcx>>,
|
||||
communicate: bool,
|
||||
) {
|
||||
if communicate {
|
||||
if ecx.machine.communicate {
|
||||
for (name, value) in std::env::vars() {
|
||||
let value = alloc_env_value(value.as_bytes(), ecx.memory_mut());
|
||||
ecx.machine.env_vars.map.insert(name.into_bytes(), value);
|
||||
|
Loading…
x
Reference in New Issue
Block a user