Uh oh!
There was an error while loading. Please reload this page.
rustc: Continue to tweak "std internal symbols" - #53640
Conversation
rust-highfive
commented
Aug 23, 2018
r? @oli-obk (rust_highfive has picked a reviewer for you, use r? to override) |
alexcrichton
commented
Aug 23, 2018
There was a problem hiding this comment.
link_name and export_name are kind of the same and should never occur at the same time, right? Could you add a comment on why there are two separate fields for it?
694015c to
967c5dcComparebors
commented
Aug 26, 2018
☔ The latest upstream changes (presumably #53619) made this pull request unmergeable. Please resolve the merge conflicts. |
michaelwoerister
commented
Aug 26, 2018
Oh nice, that's a lot of docs |
967c5dc to
74f1625Comparealexcrichton
commented
Aug 26, 2018
@bors: r=michaelwoerister |
bors
commented
Aug 26, 2018
📌 Commit 74f1625f07d55454af7aa17ebc1710065a7799e7 has been approved by |
rust-highfive
commented
Aug 26, 2018
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
alexcrichton
commented
Aug 26, 2018
@bors: r- |
In investigating [an issue][1] with `panic_implementation` defined in an executable that's optimized I once again got to rethinking a bit about the `rustc_std_internal_symbol` attribute as well as weak lang items. We've sort of been non-stop tweaking these items ever since their inception, and this continues to the trend. The crux of the bug was that in the reachability we have a [different branch][2] for non-library builds which meant that weak lang items (and std internal symbols) weren't considered reachable, causing them to get eliminiated by ThinLTO passes. The fix was to basically tweak that branch to consider these symbols to ensure that they're propagated all the way to the linker. Along the way I've attempted to erode the distinction between std internal symbols and weak lang items by having weak lang items automatically configure fields of `CodegenFnAttrs`. That way most code no longer even considers weak lang items and they're simply considered normal functions with attributes about the ABI. In the end this fixes the final comment of rust-lang#51342 [1]: rust-lang#51342 (comment) [2]: https://github.com/rust-lang/rust/blob/35bf1ae25799a4e62131159f052e0a3cbd27c960/src/librustc/middle/reachable.rs#L225-L238
74f1625 to
0a2282eComparealexcrichton
commented
Aug 26, 2018
@bors: r=michaelwoerister |
bors
commented
Aug 26, 2018
📌 Commit 0a2282e has been approved by |
bors
commented
Aug 27, 2018
…ister rustc: Continue to tweak "std internal symbols" In investigating [an issue][1] with `panic_implementation` defined in an executable that's optimized I once again got to rethinking a bit about the `rustc_std_internal_symbol` attribute as well as weak lang items. We've sort of been non-stop tweaking these items ever since their inception, and this continues to the trend. The crux of the bug was that in the reachability we have a [different branch][2] for non-library builds which meant that weak lang items (and std internal symbols) weren't considered reachable, causing them to get eliminiated by ThinLTO passes. The fix was to basically tweak that branch to consider these symbols to ensure that they're propagated all the way to the linker. Along the way I've attempted to erode the distinction between std internal symbols and weak lang items by having weak lang items automatically configure fields of `CodegenFnAttrs`. That way most code no longer even considers weak lang items and they're simply considered normal functions with attributes about the ABI. In the end this fixes the final comment of #51342 [1]: #51342 (comment) [2]: https://github.com/rust-lang/rust/blob/35bf1ae25799a4e62131159f052e0a3cbd27c960/src/librustc/middle/reachable.rs#L225-L238
bors
commented
Aug 27, 2018
☀️ Test successful - status-appveyor, status-travis |
In investigating an issue with
panic_implementationdefined in anexecutable that's optimized I once again got to rethinking a bit about the
rustc_std_internal_symbolattribute as well as weak lang items. We've sort ofbeen non-stop tweaking these items ever since their inception, and this
continues to the trend.
The crux of the bug was that in the reachability we have a different branch
for non-library builds which meant that weak lang items (and std internal
symbols) weren't considered reachable, causing them to get eliminiated by
ThinLTO passes. The fix was to basically tweak that branch to consider these
symbols to ensure that they're propagated all the way to the linker.
Along the way I've attempted to erode the distinction between std internal
symbols and weak lang items by having weak lang items automatically configure
fields of
CodegenFnAttrs. That way most code no longer even considers weaklang items and they're simply considered normal functions with attributes about
the ABI.
In the end this fixes the final comment of #51342