diff --git a/miri b/miri index 1f46f04c13e..6de2391137a 100755 --- a/miri +++ b/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 diff --git a/src/eval.rs b/src/eval.rs index ae57bcf98b9..39da414de14 100644 --- a/src/eval.rs +++ b/src/eval.rs @@ -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); diff --git a/src/shims/env.rs b/src/shims/env.rs index c941bf4f50e..eb5722a5a3d 100644 --- a/src/shims/env.rs +++ b/src/shims/env.rs @@ -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); diff --git a/travis.sh b/travis.sh index c06dbaee363..6f14be44ef0 100755 --- a/travis.sh +++ b/travis.sh @@ -8,6 +8,7 @@ else FOREIGN_TARGET=i686-unknown-linux-gnu fi export CARGO_EXTRA_FLAGS="--all-features" +export RUSTC_EXTRA_FLAGS="-D warnings" # Prepare echo "Build and install miri"