remove allows_weak_linkage target spec flag#156372
Open
RalfJung wants to merge 1 commit intorust-lang:mainfrom
Open
remove allows_weak_linkage target spec flag#156372RalfJung wants to merge 1 commit intorust-lang:mainfrom
RalfJung wants to merge 1 commit intorust-lang:mainfrom
Conversation
Collaborator
|
These commits modify compiler targets. |
Collaborator
|
r? @oli-obk rustbot has assigned @oli-obk. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Member
|
I wasn't contributing to Rust back when it was added and I have no idea what issue the comment is talking about (I don't deny existence of such bug though). IIRC, Rust for quite some time now avoids using weak symbols on non-Unix targets. I'm in favour of removal. |
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 flag doesn't actually do anything. I have no idea what it's original purpose was.
It got introduced in 59cfe90, but already a few months later in 5795098 both of its uses were removed when the entire file
src/librustc_trans/closure.rsgot deleted.It seems like back in the day we used weak linkage for closures by default and MinGW wasn't happy about that? But not much later the way we compile closures got changed, making the work-around unnecessary. The flag has then persisted unused for 10 years. A couple of Windows/UEFI targets are setting
allows_weak_linkage: falsebut I assume that was just cargo-culted.But to be sure, let's ping the folks listed for the affected targets and other Windows folks:
@dvdhrm @nicholasbishop @Berrysoft @mati865 @thomcc @tbu- @ChrisDenton