Skip to content

Commit

Permalink
Remove code that was moved from the backend to rustc_incremental
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Jan 2, 2021
1 parent 2c41a69 commit 1a1cdac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 23 deletions.
7 changes: 0 additions & 7 deletions src/driver/aot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,6 @@ pub(super) fn run_aot(
None
};

rustc_incremental::assert_dep_graph(tcx);
rustc_incremental::save_dep_graph(tcx);

let metadata_module = if need_metadata_module {
let _timer = tcx.prof.generic_activity("codegen crate metadata");
let (metadata_cgu_name, tmp_file) = tcx.sess.time("write compressed metadata", || {
Expand Down Expand Up @@ -322,10 +319,6 @@ pub(super) fn run_aot(
None
};

if tcx.sess.opts.output_types.should_codegen() {
rustc_incremental::assert_module_sources::assert_module_sources(tcx);
}

Box::new((
CodegenResults {
crate_name: tcx.crate_name(LOCAL_CRATE),
Expand Down
2 changes: 1 addition & 1 deletion src/intrinsics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ pub(crate) fn codegen_intrinsic_call<'tcx>(
}
ty => unreachable!("bswap {}", ty),
}
};
}
let res = CValue::by_val(swap(&mut fx.bcx, arg), fx.layout_of(T));
ret.write_cvalue(fx, res);
};
Expand Down
23 changes: 8 additions & 15 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ extern crate rustc_incremental;
extern crate rustc_index;
extern crate rustc_session;
extern crate rustc_span;
extern crate rustc_symbol_mangling;
extern crate rustc_target;

// This prevents duplicating functions and statics that are already part of the host rustc process.
Expand Down Expand Up @@ -257,8 +256,6 @@ impl CodegenBackend for CraneliftCodegenBackend {
};
let res = driver::codegen_crate(tcx, metadata, need_metadata_module, config);

rustc_symbol_mangling::test::report_symbol_names(tcx);

res
}

Expand All @@ -280,18 +277,14 @@ impl CodegenBackend for CraneliftCodegenBackend {
) -> Result<(), ErrorReported> {
use rustc_codegen_ssa::back::link::link_binary;

let _timer = sess.prof.generic_activity("link_crate");

sess.time("linking", || {
let target_cpu = crate::target_triple(sess).to_string();
link_binary::<crate::archive::ArArchiveBuilder<'_>>(
sess,
&codegen_results,
outputs,
&codegen_results.crate_name.as_str(),
&target_cpu,
);
});
let target_cpu = crate::target_triple(sess).to_string();
link_binary::<crate::archive::ArArchiveBuilder<'_>>(
sess,
&codegen_results,
outputs,
&codegen_results.crate_name.as_str(),
&target_cpu,
);

Ok(())
}
Expand Down

0 comments on commit 1a1cdac

Please sign in to comment.