Remove code that was moved from the backend to rustc_incremental

This commit is contained in:
bjorn3 2021-01-02 16:59:23 +01:00
parent 2c41a6953b
commit 1a1cdac930
3 changed files with 9 additions and 23 deletions

View file

@ -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", || {
@ -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),

View file

@ -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);
};

View file

@ -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.
@ -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
}
@ -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(())
}