diff options
| author | Ben Kimock <kimockb@gmail.com> | 2024-07-28 16:54:14 -0400 |
|---|---|---|
| committer | Ben Kimock <kimockb@gmail.com> | 2025-02-24 19:46:48 -0500 |
| commit | cae7c76d509386ea29a90c4001bb8dbc59c79d22 (patch) | |
| tree | 809697abba06a0f819405dbbeb601ee5b7201f37 /compiler/rustc_codegen_cranelift/src | |
| parent | 9af8985e059071ea2e0566969a4f140eca73fca9 (diff) | |
| download | rust-cae7c76d509386ea29a90c4001bb8dbc59c79d22.tar.gz rust-cae7c76d509386ea29a90c4001bb8dbc59c79d22.zip | |
Avoid no-op unlink+link dances in incr comp
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/driver/aot.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/driver/aot.rs b/compiler/rustc_codegen_cranelift/src/driver/aot.rs index a52b18573b1..d1843f90a07 100644 --- a/compiler/rustc_codegen_cranelift/src/driver/aot.rs +++ b/compiler/rustc_codegen_cranelift/src/driver/aot.rs @@ -103,12 +103,14 @@ impl OngoingCodegen { ("o", &module_regular.object.as_ref().unwrap()), ("asm.o", &module_global_asm.object.as_ref().unwrap()), ], + &[], ) } else { rustc_incremental::copy_cgu_workproduct_to_incr_comp_cache_dir( sess, &module_regular.name, &[("o", &module_regular.object.as_ref().unwrap())], + &[], ) }; if let Some((work_product_id, work_product)) = work_product { @@ -381,6 +383,7 @@ fn emit_cgu( bytecode: None, assembly: None, llvm_ir: None, + links_from_incr_cache: Vec::new(), }), existing_work_product: None, }) @@ -437,6 +440,7 @@ fn emit_module( bytecode: None, assembly: None, llvm_ir: None, + links_from_incr_cache: Vec::new(), }) } @@ -487,6 +491,7 @@ fn reuse_workproduct_for_cgu( bytecode: None, assembly: None, llvm_ir: None, + links_from_incr_cache: Vec::new(), }, module_global_asm: has_global_asm.then(|| CompiledModule { name: cgu.name().to_string(), @@ -496,6 +501,7 @@ fn reuse_workproduct_for_cgu( bytecode: None, assembly: None, llvm_ir: None, + links_from_incr_cache: Vec::new(), }), existing_work_product: Some((cgu.work_product_id(), work_product)), }) @@ -637,6 +643,7 @@ fn emit_metadata_module(tcx: TyCtxt<'_>, metadata: &EncodedMetadata) -> Compiled bytecode: None, assembly: None, llvm_ir: None, + links_from_incr_cache: Vec::new(), } } @@ -745,7 +752,6 @@ pub(crate) fn run_aot( let metadata_module = if need_metadata_module { Some(emit_metadata_module(tcx, &metadata)) } else { None }; - Box::new(OngoingCodegen { modules, allocator_module, |
