Skip to content

Commit e093837

Browse files
committed
Fix it
1 parent 3b184d7 commit e093837

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/driver/aot.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,8 @@ fn codegen_cgu_content(
552552
let dep_node = mono_item.codegen_dep_node(tcx);
553553
let mut hasher = StableHasher::new();
554554
tcx.with_stable_hashing_context(|mut hcx| {
555+
// Different crates may use different symbol name mangling for the same private function
556+
tcx.stable_crate_id(LOCAL_CRATE).hash_stable(&mut hcx, &mut hasher);
555557
instance.hash_stable(&mut hcx, &mut hasher);
556558
});
557559
let cache_key: Fingerprint = hasher.finish();
@@ -594,6 +596,8 @@ fn codegen_cgu_content(
594596

595597
let mut hasher = StableHasher::new();
596598
tcx.with_stable_hashing_context(|mut hcx| {
599+
// Different crates may use different symbol name mangling for the same private function
600+
tcx.stable_crate_id(LOCAL_CRATE).hash_stable(&mut hcx, &mut hasher);
597601
instance.hash_stable(&mut hcx, &mut hasher);
598602
});
599603
let cache_key: Fingerprint = hasher.finish();

0 commit comments

Comments
 (0)