Enable -Zfunction-sections by default for *-windows-{gnu,cygwin} by wesleywiser · Pull Request #148669 · rust-lang/rust (original) (raw)
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
The comment here was a bit misleading, #13846 was about an LLVM assertion that failed when -Zfunction-sections was enabled. However, that bug has been fixed for a long time and the actual issue was that older ld versions would not correctly link binaries (see #75604 for the prior attempt at this change). This bug was fixed in version 2.32 of binutils and Rust now ships binutils 2.42 as of #119229 so we can remove this workaround!
The comment here was a bit misleading, rust-lang#13846 was about an LLVM assertion
that failed when -Zfunction-sections was enabled. However, that bug
has been fixed for a long time and the actual issue was that older ld
versions would not correctly link binaries (see rust-lang#75604 for the prior
attempt at this change). This bug was fixed in version 2.32 of binutils
and Rust now ships binutils 2.42 as of rust-lang#119229 so we can remove this
workaround!
rustbot added S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
This comment has been minimized.
@bors try jobs=x86_64-mingw-1,x86_64-mingw-2
This comment has been minimized.
rust-bors bot added a commit that referenced this pull request
…try>
Enable -Zfunction-sections by default for *-windows-{gnu,cygwin}
try-job: x86_64-mingw-1 try-job: x86_64-mingw-2
This comment has been minimized.
…-{gnu,cygwin}`"
This reverts commit e23a5fc.
@bors try jobs=x86_64-mingw-1,x86_64-mingw-2
This comment has been minimized.
rust-bors bot added a commit that referenced this pull request
…try>
Enable -Zfunction-sections by default for *-windows-{gnu,cygwin}
try-job: x86_64-mingw-1 try-job: x86_64-mingw-2
☀️ Try build successful (CI)
Build commit: 63e4cbf (63e4cbf99d7fffa8992085764a640100c6a68dbf, parent: 87f9dcd5e28a301fce81515bd4bea792444dcf29)
I don't know whether it still triggers an assertion because Rust doesn't build do LLVM build with assertions enabled for Windows GNU. The assertion is probably gone because functions sections work fine with Clang+LLD (gnullvm targets are built with function sections).
My comment on that issue was short-lived, some of the issues were fixed, but new ones popped up. AFAICT, this still doesn't fully work with trunk versions of GCC and Binutils.
Labels
Status: This is awaiting some action (such as code changes or more information) from the author.
Relevant to the compiler team, which will review and decide on the PR/issue.