From b86a2ee03686905afb7ae90fd092af037da5906d Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Mon, 30 Aug 2021 15:06:56 +0200 Subject: [PATCH] Use in_incr_comp_dir_sess in cg_clif --- compiler/rustc_codegen_cranelift/src/driver/aot.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/rustc_codegen_cranelift/src/driver/aot.rs b/compiler/rustc_codegen_cranelift/src/driver/aot.rs index a8b802f4494..3de706ed6d7 100644 --- a/compiler/rustc_codegen_cranelift/src/driver/aot.rs +++ b/compiler/rustc_codegen_cranelift/src/driver/aot.rs @@ -68,14 +68,13 @@ fn reuse_workproduct_for_cgu( cgu: &CodegenUnit<'_>, work_products: &mut FxHashMap, ) -> 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 {}: {}",