extern crate rustc_allocator;
extern crate rustc_apfloat;
extern crate rustc_back;
-extern crate rustc_binaryen;
extern crate rustc_const_math;
-extern crate rustc_data_structures;
+#[macro_use] extern crate rustc_data_structures;
extern crate rustc_demangle;
extern crate rustc_incremental;
extern crate rustc_llvm as llvm;
extern crate syntax_pos;
extern crate rustc_errors as errors;
extern crate serialize;
-#[cfg(windows)]
extern crate cc; // Used to locate MSVC
extern crate tempdir;
use std::any::Any;
use std::path::PathBuf;
-use std::rc::Rc;
use std::sync::mpsc;
+use rustc_data_structures::sync::Lrc;
use rustc::dep_graph::DepGraph;
use rustc::hir::def_id::CrateNum;
mod cabi_x86;
mod cabi_x86_64;
mod cabi_x86_win64;
+mod cabi_wasm32;
mod callee;
mod common;
mod consts;
back::write::dump_incremental_data(&trans);
}
- time(sess.time_passes(),
+ time(sess,
"serialize work products",
move || rustc_incremental::save_work_products(sess, &dep_graph));
// Run the linker on any artifacts that resulted from the LLVM run.
// This should produce either a finished executable or library.
- time(sess.time_passes(), "linking", || {
+ time(sess, "linking", || {
back::link::link_binary(sess, &trans, outputs, &trans.crate_name.as_str());
});
profiler_runtime: Option<CrateNum>,
sanitizer_runtime: Option<CrateNum>,
is_no_builtins: FxHashSet<CrateNum>,
- native_libraries: FxHashMap<CrateNum, Rc<Vec<NativeLibrary>>>,
+ native_libraries: FxHashMap<CrateNum, Lrc<Vec<NativeLibrary>>>,
crate_name: FxHashMap<CrateNum, String>,
- used_libraries: Rc<Vec<NativeLibrary>>,
- link_args: Rc<Vec<String>>,
- used_crate_source: FxHashMap<CrateNum, Rc<CrateSource>>,
+ used_libraries: Lrc<Vec<NativeLibrary>>,
+ link_args: Lrc<Vec<String>>,
+ used_crate_source: FxHashMap<CrateNum, Lrc<CrateSource>>,
used_crates_static: Vec<(CrateNum, LibSource)>,
used_crates_dynamic: Vec<(CrateNum, LibSource)>,
}