diff --git a/src/rusti/exec.rs b/src/rusti/exec.rs index 775d323..cb94f63 100644 --- a/src/rusti/exec.rs +++ b/src/rusti/exec.rs @@ -305,6 +305,7 @@ impl Write for SyncBuf { fn compile_input(input: Input, sysroot: PathBuf, libs: Vec) -> Option<(llvm::ModuleRef, Deps)> { let r = monitor(move || { + driver::reset_thread_local_state(); let opts = build_exec_options(sysroot, libs); let dep_graph = DepGraph::new(opts.build_dep_graph()); let cstore = Rc::new(CStore::new(&dep_graph)); @@ -369,6 +370,7 @@ fn with_analysis(f: F, input: Input, sysroot: PathBuf, libs: Vec) where F: Send + 'static, R: Send + 'static, F: for<'a, 'gcx, 'tcx> FnOnce(&Crate, &ty::TyCtxt<'a, 'gcx, 'tcx>, ty::CrateAnalysis) -> R { monitor(move || { + driver::reset_thread_local_state(); let opts = build_exec_options(sysroot, libs); let dep_graph = DepGraph::new(opts.build_dep_graph()); let cstore = Rc::new(CStore::new(&dep_graph));