about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/driver/aot.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-09-02 13:12:59 +0000
committerbors <bors@rust-lang.org>2021-09-02 13:12:59 +0000
commitfcce644119cf4e8e36001368e514bb5ed67cb855 (patch)
tree8058e32ec6ced8b9d3ac006686263aba91a4ae17 /compiler/rustc_codegen_cranelift/src/driver/aot.rs
parent64929313f53181636e4dd37e25836973205477e4 (diff)
parent74c7f1267b2afe17332ba3aa6b00eb9452404cf3 (diff)
downloadrust-fcce644119cf4e8e36001368e514bb5ed67cb855.tar.gz
rust-fcce644119cf4e8e36001368e514bb5ed67cb855.zip
Auto merge of #88530 - bjorn3:shrink_session, r=cjgillot
Shrink Session a bit

Remove a couple of unnecessary fields from `Session` and remove a `Lock<T>` for a field that is never mutated anyway.
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/driver/aot.rs')
-rw-r--r--compiler/rustc_codegen_cranelift/src/driver/aot.rs3
1 files changed, 1 insertions, 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<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 {}: {}",