Merge pull request #337 from RalfJung/rustup

rustup
This commit is contained in:
Ralf Jung 2017-09-14 11:00:45 +02:00 committed by GitHub
commit 02e09dc187
4 changed files with 10 additions and 23 deletions

View file

@ -16,9 +16,9 @@ script:
xargo/build.sh
- |
# Test plain miri
cargo build --locked --release --features "cargo_miri" &&
cargo test --release --all &&
cargo install --features "cargo_miri"
cargo build --locked --release --all-features &&
cargo test --locked --release --all-features --all &&
cargo install --locked --all-features
- |
# Test cargo miri
cd cargo-miri-test &&
@ -27,7 +27,7 @@ script:
cd ..
- |
# and run all tests with full mir
MIRI_SYSROOT=~/.xargo/HOST cargo test --release
MIRI_SYSROOT=~/.xargo/HOST cargo test --locked --release
- |
# test that the rustc_tests binary compiles
cd rustc_tests &&

View file

@ -11,6 +11,7 @@ extern crate syntax;
extern crate log;
use rustc::session::Session;
use rustc::middle::cstore::CrateStore;
use rustc_driver::{Compilation, CompilerCalls, RustcDefaultCalls};
use rustc_driver::driver::{CompileState, CompileController};
use rustc::session::config::{self, Input, ErrorOutputType};
@ -64,11 +65,12 @@ impl<'a> CompilerCalls<'a> for MiriCompilerCalls {
&mut self,
matches: &getopts::Matches,
sess: &Session,
cstore: &CrateStore,
input: &Input,
odir: &Option<PathBuf>,
ofile: &Option<PathBuf>,
) -> Compilation {
self.default.late_callback(matches, sess, input, odir, ofile)
self.default.late_callback(matches, sess, cstore, input, odir, ofile)
}
fn build_controller(
&mut self,

View file

@ -13,6 +13,7 @@ use std::io;
use rustc::session::Session;
use rustc::middle::cstore::CrateStore;
use rustc_driver::{Compilation, CompilerCalls, RustcDefaultCalls};
use rustc_driver::driver::{CompileState, CompileController};
use rustc::session::config::{self, Input, ErrorOutputType};
@ -52,11 +53,12 @@ impl<'a> CompilerCalls<'a> for MiriCompilerCalls {
&mut self,
matches: &getopts::Matches,
sess: &Session,
cstore: &CrateStore,
input: &Input,
odir: &Option<PathBuf>,
ofile: &Option<PathBuf>
) -> Compilation {
self.default.late_callback(matches, sess, input, odir, ofile)
self.default.late_callback(matches, sess, cstore, input, odir, ofile)
}
fn build_controller(&mut self, sess: &Session, matches: &getopts::Matches) -> CompileController<'a> {
let mut control = self.default.build_controller(sess, matches);

View file

@ -398,23 +398,6 @@ impl<'a, 'tcx, M: Machine<'tcx>> EvalContext<'a, 'tcx, M> {
}
}
// HACK: For now, bail out if we hit a dead local during recovery (can happen because sometimes we have
// StorageDead before EndRegion due to https://github.com/rust-lang/rust/issues/43481).
// TODO: We should rather fix the MIR.
match query.lval.1 {
Lvalue::Local { frame, local } => {
let res = self.stack[frame].get_local(local);
match (res, mode) {
(Err(EvalError { kind: EvalErrorKind::DeadLocal, .. }),
ValidationMode::Recover(_)) => {
return Ok(());
}
_ => {}
}
}
_ => {}
}
query.ty = self.normalize_type_unerased(&query.ty);
trace!("{:?} on {:?}", mode, query);