Skip to content

Commit 05cf391

Browse files
committed
Fill out links_from_incr_cache in cg_clif
1 parent cae7c76 commit 05cf391

File tree

1 file changed

+6
-4
lines changed
  • compiler/rustc_codegen_cranelift/src/driver

1 file changed

+6
-4
lines changed

compiler/rustc_codegen_cranelift/src/driver/aot.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ fn reuse_workproduct_for_cgu(
464464
err
465465
));
466466
}
467+
467468
let obj_out_global_asm =
468469
crate::global_asm::add_file_stem_postfix(obj_out_regular.clone(), ".asm");
469470
let has_global_asm = if let Some(asm_o) = work_product.saved_files.get("asm.o") {
@@ -472,8 +473,8 @@ fn reuse_workproduct_for_cgu(
472473
{
473474
return Err(format!(
474475
"unable to copy {} to {}: {}",
475-
source_file_regular.display(),
476-
obj_out_regular.display(),
476+
source_file_global_asm.display(),
477+
obj_out_global_asm.display(),
477478
err
478479
));
479480
}
@@ -491,7 +492,7 @@ fn reuse_workproduct_for_cgu(
491492
bytecode: None,
492493
assembly: None,
493494
llvm_ir: None,
494-
links_from_incr_cache: Vec::new(),
495+
links_from_incr_cache: vec![source_file_regular],
495496
},
496497
module_global_asm: has_global_asm.then(|| CompiledModule {
497498
name: cgu.name().to_string(),
@@ -501,7 +502,7 @@ fn reuse_workproduct_for_cgu(
501502
bytecode: None,
502503
assembly: None,
503504
llvm_ir: None,
504-
links_from_incr_cache: Vec::new(),
505+
links_from_incr_cache: vec![source_file_global_asm],
505506
}),
506507
existing_work_product: Some((cgu.work_product_id(), work_product)),
507508
})
@@ -752,6 +753,7 @@ pub(crate) fn run_aot(
752753

753754
let metadata_module =
754755
if need_metadata_module { Some(emit_metadata_module(tcx, &metadata)) } else { None };
756+
755757
Box::new(OngoingCodegen {
756758
modules,
757759
allocator_module,

0 commit comments

Comments
 (0)