Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
Roll back to nightly-2019-07-08 for release to LIBRA
Browse files Browse the repository at this point in the history
  • Loading branch information
Herman Venter committed Aug 16, 2019
1 parent dca72b6 commit 33d96ea
Show file tree
Hide file tree
Showing 12 changed files with 89 additions and 205 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
os: osx
language: rust
rust:
- nightly-2019-08-12
- nightly-2019-07-08

before_install:
- if [ ${TRAVIS_OS_NAME} == "osx" ]; then curl -L https://github.com/mozilla/grcov/releases/download/v0.4.3/grcov-osx-x86_64.tar.bz2 | tar jxf -; fi
Expand Down
78 changes: 2 additions & 76 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion checker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

name = "mirai"
version = "1.0.0"
version = "1.0.1"
authors = ["Herman Venter <[email protected]>"]
description = "A static analysis tool for Rust, based on Abstract Interpretation of MIR"
repository = "https://github.com/facebookexperimental/MIRAI"
Expand Down
14 changes: 4 additions & 10 deletions checker/src/callbacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use log::{info, warn};
use log_derive::{logfn, logfn_inputs};
use rustc::hir::def_id::DefId;
use rustc::ty::TyCtxt;
use rustc_driver::Compilation;
use rustc_interface::interface;
use std::collections::{HashMap, HashSet};
use std::fmt::{Debug, Formatter, Result};
Expand Down Expand Up @@ -90,24 +89,19 @@ impl rustc_driver::Callbacks for MiraiCallbacks {
/// interpretation of all of the functions that will end up in the compiler output.
/// If this method returns false, the compilation will stop.
#[logfn(TRACE)]
fn after_analysis(&mut self, compiler: &interface::Compiler) -> Compilation {
fn after_analysis(&mut self, compiler: &interface::Compiler) -> bool {
compiler.session().abort_if_errors();
if self.output_directory.to_str().unwrap().contains("/build/") {
// No need to analyze a build script, but do generate code.
return Compilation::Continue;
return true;
}
compiler
.global_ctxt()
.unwrap()
.peek_mut()
.enter(|tcx| self.analyze_with_mirai(compiler, &tcx));
if self.test_run {
// We avoid code gen for test cases because LLVM is not used in a thread safe manner.
Compilation::Stop
} else {
// Although MIRAI is only a checker, cargo still needs code generation to work.
Compilation::Continue
}
!self.test_run // Although MIRAI is only a checker, cargo still needs code generation to work.
// We avoid code gen for test cases because LLVM is not used in a thread safe manner.
}
}

Expand Down
2 changes: 1 addition & 1 deletion checker/src/summaries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ impl<'a, 'tcx: 'a> PersistentSummaryCache<'a, 'tcx> {
self.cache.entry(def_id).or_insert_with(|| {
let summary = Self::get_persistent_summary_for_db(db, &persistent_key);
if !def_id.is_local() && summary.is_none() {
info!(
warn!(
"Summary store has no entry for {}{}",
persistent_key, arg_types_key
);
Expand Down
Loading

0 comments on commit 33d96ea

Please sign in to comment.