Truncate hex stable crate id to 8 characters (32 bits)
This commit is contained in:
parent
ca935ddbf1
commit
56c6a48d2e
2 changed files with 8 additions and 3 deletions
|
@ -494,14 +494,19 @@ impl CodegenUnitNameBuilder<'tcx> {
|
|||
format!(
|
||||
"-in-{}.{:08x}",
|
||||
tcx.crate_name(LOCAL_CRATE),
|
||||
local_stable_crate_id.to_u64()
|
||||
local_stable_crate_id.to_u64() as u32,
|
||||
)
|
||||
} else {
|
||||
String::new()
|
||||
};
|
||||
|
||||
let stable_crate_id = tcx.sess.local_stable_crate_id();
|
||||
format!("{}.{:08x}{}", tcx.crate_name(cnum), stable_crate_id.to_u64(), local_crate_id)
|
||||
format!(
|
||||
"{}.{:08x}{}",
|
||||
tcx.crate_name(cnum),
|
||||
stable_crate_id.to_u64() as u32,
|
||||
local_crate_id,
|
||||
)
|
||||
});
|
||||
|
||||
write!(cgu_name, "{}", crate_prefix).unwrap();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
warning: Linking globals named 'foo': symbol multiply defined!
|
||||
|
||||
error: failed to load bc of "lto-duplicate-symbols2.lto_duplicate_symbols2.288b404e693a75b4-cgu.0.rcgu.o":
|
||||
error: failed to load bc of "lto-duplicate-symbols2.lto_duplicate_symbols2.693a75b4-cgu.0.rcgu.o":
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue