Enable -Zfunction-sections by default for *-windows-{gnu,cygwin}#148669
Closed
wesleywiser wants to merge 2 commits intorust-lang:mainfrom
Closed
Enable -Zfunction-sections by default for *-windows-{gnu,cygwin}#148669wesleywiser wants to merge 2 commits intorust-lang:mainfrom
-Zfunction-sections by default for *-windows-{gnu,cygwin}#148669wesleywiser wants to merge 2 commits intorust-lang:mainfrom
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.
Member
Author
|
@bors try jobs=x86_64-mingw-1,x86_64-mingw-2 |
This comment has been minimized.
This comment has been minimized.
rust-bors bot
added a commit
that referenced
this pull request
Nov 7, 2025
…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.
Contributor
|
💔 Test for ef05458 failed: CI. Failed jobs:
|
…-{gnu,cygwin}`"
This reverts commit e23a5fc.
Member
Author
|
@bors try jobs=x86_64-mingw-1,x86_64-mingw-2 |
This comment has been minimized.
This comment has been minimized.
rust-bors bot
added a commit
that referenced
this pull request
Nov 8, 2025
…try>
Enable `-Zfunction-sections` by default for `*-windows-{gnu,cygwin}`
try-job: x86_64-mingw-1
try-job: x86_64-mingw-2
Contributor
Member
|
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). |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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!