#![feature(link_args)]
#![feature(static_nobundle)]
#![feature(trusted_len)]
+#![recursion_limit = "256"]
use back::write::{create_informational_target_machine, create_target_machine};
-use syntax_pos::symbol::Symbol;
+use rustc_span::symbol::Symbol;
pub use llvm_util::target_features;
use rustc::dep_graph::WorkProduct;
&self,
tcx: TyCtxt<'_>,
cgu_name: Symbol,
- tx: &std::sync::mpsc::Sender<Box<dyn Any + Send>>,
- ) {
- base::compile_codegen_unit(tcx, cgu_name, tx);
+ ) -> (ModuleCodegen<ModuleLlvm>, u64) {
+ base::compile_codegen_unit(tcx, cgu_name)
}
fn target_machine_factory(
&self,
dep_graph: &DepGraph,
outputs: &OutputFilenames,
) -> Result<(), ErrorReported> {
- use rustc::util::common::time;
let (codegen_results, work_products) = ongoing_codegen
.downcast::<rustc_codegen_ssa::back::write::OngoingCodegen<LlvmCodegenBackend>>()
.expect("Expected LlvmCodegenBackend's OngoingCodegen, found Box<Any>")
rustc_codegen_ssa::back::write::dump_incremental_data(&codegen_results);
}
- time(sess, "serialize work products", move || {
+ sess.time("serialize_work_products", move || {
rustc_incremental::save_work_product_index(sess, &dep_graph, work_products)
});
// Run the linker on any artifacts that resulted from the LLVM run.
// This should produce either a finished executable or library.
- time(sess, "linking", || {
- let _prof_timer = sess.prof.generic_activity("link_crate");
-
+ sess.time("link_crate", || {
use crate::back::archive::LlvmArchiveBuilder;
use rustc_codegen_ssa::back::link::link_binary;