Skip to content

Rustup #379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jun 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ script:
- |
# Test plain miri
cargo build --release --all-features &&
cargo test --release --all-features --all &&
RUST_BACKTRACE=1 cargo test --release --all-features --all &&
cargo install --all-features --force
- |
# Test cargo miri
Expand Down
9 changes: 3 additions & 6 deletions benches/helpers/miri_helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,13 @@ impl<'a> CompilerCalls<'a> for MiriCompilerCalls<'a> {
state.session.abort_if_errors();

let tcx = state.tcx.unwrap();
let (entry_node_id, _) = state.session.entry_fn.borrow().expect(
let (entry_node_id, _, _) = state.session.entry_fn.borrow().expect(
"no main or start function found",
);
let entry_def_id = tcx.map.local_def_id(entry_node_id);
let entry_def_id = tcx.hir.local_def_id(entry_node_id);

let memory_size = 100 * 1024 * 1024; // 100MB
let step_limit = 1000_000;
let stack_limit = 100;
bencher.borrow_mut().iter(|| {
eval_main(tcx, entry_def_id, memory_size, step_limit, stack_limit);
eval_main(tcx, entry_def_id, None);
});

state.session.abort_if_errors();
Expand Down
12 changes: 6 additions & 6 deletions cargo-miri-test/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

203 changes: 127 additions & 76 deletions rustc_tests/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions rustc_tests/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ extern crate getopts;
extern crate rustc;
extern crate rustc_driver;
extern crate rustc_errors;
extern crate rustc_trans_utils;
extern crate rustc_codegen_utils;
extern crate syntax;

use std::path::{PathBuf, Path};
Expand All @@ -19,7 +19,7 @@ use rustc_driver::{Compilation, CompilerCalls, RustcDefaultCalls};
use rustc_driver::driver::{CompileState, CompileController};
use rustc::session::config::{self, Input, ErrorOutputType};
use rustc::hir::{self, itemlikevisit};
use rustc_trans_utils::trans_crate::TransCrate;
use rustc_codegen_utils::codegen_backend::CodegenBackend;
use rustc::ty::TyCtxt;
use syntax::ast;

Expand Down Expand Up @@ -53,7 +53,7 @@ impl<'a> CompilerCalls<'a> for MiriCompilerCalls {
}
fn late_callback(
&mut self,
trans: &TransCrate,
trans: &CodegenBackend,
matches: &getopts::Matches,
sess: &Session,
cstore: &CrateStore,
Expand Down Expand Up @@ -104,9 +104,7 @@ fn after_analysis<'a, 'tcx>(state: &mut CompileState<'a, 'tcx>) {
state.hir_crate.unwrap().visit_all_item_likes(&mut Visitor(tcx, state));
} else if let Some((entry_node_id, _, _)) = *state.session.entry_fn.borrow() {
let entry_def_id = tcx.hir.local_def_id(entry_node_id);
let start_wrapper = tcx.lang_items().start_fn().and_then(|start_fn|
if tcx.is_mir_available(start_fn) { Some(start_fn) } else { None });
miri::eval_main(tcx, entry_def_id, start_wrapper);
miri::eval_main(tcx, entry_def_id, None);

state.session.abort_if_errors();
} else {
Expand Down
Loading