Uh oh!
There was an error while loading. Please reload this page.
rustc: Handle #[no_mangle] anywhere in a crate - #45189
Conversation
alexcrichton
commented
Oct 10, 2017
rust-highfive
commented
Oct 10, 2017
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
michaelwoerister
commented
Oct 11, 2017
Looks good to me. Some tests are failing though. |
1b8e3de to
c7aa741Comparealexcrichton
commented
Oct 11, 2017
Ok I changed this to just handling @bors: r=michaelwoerister |
bors
commented
Oct 11, 2017
📌 Commit c7aa741 has been approved by |
…michaelwoerister rustc: Handle `#[no_mangle]` anywhere in a crate This commit updates the reachability pass of the compiler to seed the local worklist with `#[no_mangle]`-like items anywhere in a crate, not just those reachable from public items. Closesrust-lang#45165
kennytm
commented
Oct 12, 2017
@bors r- asm.js's The test involves Details |
michaelwoerister
commented
Oct 12, 2017
@alexcrichton So what exactly is going on here? I.e. what is the root cause of the problem this PR tries to fix? |
alexcrichton
commented
Oct 12, 2017
@michaelwoerister the problem is that ThinLTO is internalizing these symbols when they otherwise need to be exposed. That in turns happens because locally defined allocator symbols aren't in the list of "rust exported symbols" (the |
michaelwoerister
commented
Oct 12, 2017
@alexcrichton But why is that a problem with ThinLTO but not the regular multi-CGU case? |
alexcrichton
commented
Oct 12, 2017
I think that happens is that in normal trans we will translate everything to LLVM and at that time we'll recognize Does that make sense? |
This commit updates the reachability pass of the compiler to seed the local worklist with `#[linkage]`-like items anywhere in a crate, not just those reachable from public items. Closesrust-lang#45165
c7aa741 to
6cae080Comparealexcrichton
commented
Oct 12, 2017
Also I'm removing that test once and for all, it has caused dozens and dozens of failures and has literally never caught a regression. @bors: r=michaelwoerister |
bors
commented
Oct 12, 2017
📌 Commit 6cae080 has been approved by |
michaelwoerister
commented
Oct 12, 2017
|
michaelwoerister
commented
Oct 12, 2017
Thanks for the clarification. |
…michaelwoerister rustc: Handle `#[no_mangle]` anywhere in a crate This commit updates the reachability pass of the compiler to seed the local worklist with `#[no_mangle]`-like items anywhere in a crate, not just those reachable from public items. Closesrust-lang#45165
This commit updates the reachability pass of the compiler to seed the local
worklist with
#[no_mangle]-like items anywhere in a crate, not just thosereachable from public items.
Closes#45165