-
Notifications
You must be signed in to change notification settings - Fork 14k
Enable -Zfunction-sections by default for *-windows-{gnu,cygwin}
#148669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Enable -Zfunction-sections by default for *-windows-{gnu,cygwin}
#148669
Conversation
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!
This comment has been minimized.
This comment has been minimized.
|
@bors try jobs=x86_64-mingw-1,x86_64-mingw-2 |
This comment has been minimized.
This comment has been minimized.
…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.
This comment has been minimized.
|
💔 Test for ef05458 failed: CI. Failed jobs:
|
…-{gnu,cygwin}`"
This reverts commit e23a5fc.
|
@bors try jobs=x86_64-mingw-1,x86_64-mingw-2 |
This comment has been minimized.
This comment has been minimized.
…try>
Enable `-Zfunction-sections` by default for `*-windows-{gnu,cygwin}`
try-job: x86_64-mingw-1
try-job: x86_64-mingw-2
|
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). |
The comment here was a bit misleading, #13846 was about an LLVM assertion that failed when
-Zfunction-sectionswas enabled. However, that bug has been fixed for a long time and the actual issue was that olderldversions 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!