Skip to content

Commit

Permalink
Use in_incr_comp_dir_sess in cg_clif
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Sep 2, 2021
1 parent 39e16da commit e604975
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/driver/aot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,13 @@ fn reuse_workproduct_for_cgu(
cgu: &CodegenUnit<'_>,
work_products: &mut FxHashMap<WorkProductId, WorkProduct>,
) -> CompiledModule {
let incr_comp_session_dir = tcx.sess.incr_comp_session_dir();
let mut object = None;
let work_product = cgu.work_product(tcx);
if let Some(saved_file) = &work_product.saved_file {
let obj_out =
tcx.output_filenames(()).temp_path(OutputType::Object, Some(&cgu.name().as_str()));
object = Some(obj_out.clone());
let source_file = rustc_incremental::in_incr_comp_dir(&incr_comp_session_dir, &saved_file);
let source_file = rustc_incremental::in_incr_comp_dir_sess(&tcx.sess, &saved_file);
if let Err(err) = rustc_fs_util::link_or_copy(&source_file, &obj_out) {
tcx.sess.err(&format!(
"unable to copy {} to {}: {}",
Expand Down

0 comments on commit e604975

Please sign in to comment.