diff options
Diffstat (limited to 'src/librustc_driver/lib.rs')
| -rw-r--r-- | src/librustc_driver/lib.rs | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index e9f30937300..c8a5bbe8315 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -16,6 +16,7 @@ #![feature(slice_sort_by_cached_key)] #![feature(set_stdio)] #![feature(no_debug)] +#![feature(integer_atomics)] #![recursion_limit="256"] @@ -56,10 +57,9 @@ extern crate syntax_pos; use driver::CompileController; use pretty::{PpMode, UserIdentifiedItem}; -use rustc_resolve as resolve; use rustc_save_analysis as save; use rustc_save_analysis::DumpHandler; -use rustc_data_structures::sync::{self, Lrc}; +use rustc_data_structures::sync::{self, Lrc, Ordering::SeqCst}; use rustc_data_structures::OnDrop; use rustc::session::{self, config, Session, build_session, CompileResult}; use rustc::session::CompileIncomplete; @@ -200,14 +200,7 @@ pub fn run<F>(run_compiler: F) -> isize } fn load_backend_from_dylib(path: &Path) -> fn() -> Box<dyn CodegenBackend> { - // Note that we're specifically using `open_global_now` here rather than - // `open`, namely we want the behavior on Unix of RTLD_GLOBAL and RTLD_NOW, - // where NOW means "bind everything right now" because we don't want - // surprises later on and RTLD_GLOBAL allows the symbols to be made - // available for future dynamic libraries opened. This is currently used by - // loading LLVM and then making its symbols available for other dynamic - // libraries. - let lib = DynamicLibrary::open_global_now(path).unwrap_or_else(|err| { + let lib = DynamicLibrary::open(Some(path)).unwrap_or_else(|err| { let err = format!("couldn't load codegen backend {:?}: {:?}", path, err); early_error(ErrorOutputType::default(), &err); }); @@ -886,7 +879,6 @@ impl<'a> CompilerCalls<'a> for RustcDefaultCalls { pretty::print_after_hir_lowering(state.session, state.cstore.unwrap(), state.hir_map.unwrap(), - state.analysis.unwrap(), state.resolutions.unwrap(), state.input, &state.expanded_crate.take().unwrap(), @@ -934,7 +926,7 @@ impl<'a> CompilerCalls<'a> for RustcDefaultCalls { let sess = state.session; eprintln!("Fuel used by {}: {}", sess.print_fuel_crate.as_ref().unwrap(), - sess.print_fuel.get()); + sess.print_fuel.load(SeqCst)); } } control @@ -947,7 +939,6 @@ pub fn enable_save_analysis(control: &mut CompileController) { time(state.session, "save analysis", || { save::process_crate(state.tcx.unwrap(), state.expanded_crate.unwrap(), - state.analysis.unwrap(), state.crate_name.unwrap(), state.input, None, @@ -956,7 +947,6 @@ pub fn enable_save_analysis(control: &mut CompileController) { }); }; control.after_analysis.run_callback_on_error = true; - control.make_glob_map = resolve::MakeGlobMap::Yes; } impl RustcDefaultCalls { |
