Repository navigation
Conversation
|
r? @fee1-dead rustbot has assigned @fee1-dead. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
cc @bjorn3 |
fbff534 to
de147c9
Compare
| }); | ||
| // Use the same disambiguator as 'core' to ensure #[rustc_std_internal_symbol] functions | ||
| // get a different symbol name depending on the rustc version and -Cmetadata flags. | ||
| if let Some(sized) = tcx.lang_items().sized_trait() { |
There was a problem hiding this comment.
The Sized trait is guaranteed to exist at this point. If you try to define any function or static without defining the Sized trait you will get an error during type checking.
There was a problem hiding this comment.
Should I just unwrap, then?
There was a problem hiding this comment.
Looks like that's not quite true. CI fails with unwrap.
8b77646 to
ca9ccce
Compare
|
The job Click to see the possible cause of the failure (guessed by this bot)Important For more information how to resolve CI failures of this job, visit this link. |
|
r? @bjorn3 |
|
profiler_builtins is |
|
Looks like |
|
Yeah, that is what I'm saying. It likely tries to compute the symbol name of the personality function ( |
|
☔ The latest upstream changes (presumably #165234) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
Internal symbols incorporate the rustc version in the disambiguator to avoid linker errors when linking together multiple staticlibs containing rustc code built separately.
rust/compiler/rustc_symbol_mangling/src/lib.rs
Lines 200 to 205 in 1731fae
However, the current logic doesn't properly avoid linker errors if you link together multiple staticlibs with the same rustc version but using
-Zbuild-stdand-Cmetadatato give the two copies ofcoredifferent symbol names.To fix this, have internal symbols use the same disambiguator as the
corecrate, which will avoid this linker error.