Skip to content

Revert "IRGen: Weakly link symbols for unavailable declarations" #64384

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

Merged
merged 1 commit into from
Mar 15, 2023

Conversation

compnerd
Copy link
Member

Reverts #64353

@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

CC: @tshortli

@compnerd
Copy link
Member Author

CC: @Azoy

@compnerd
Copy link
Member Author

Error message for ease of finding:

DateComponentsFormatter.swift.obj : fatal error LNK1227: conflicting weak extern definition for '$s10Foundation9FormatterC11objectValueyypSgSSKF'.  New default '.weak.$s10Foundation9FormatterC11objectValueyypSgSSKF.default.$s10Foundation23DateComponentsFormatterC10UnitsStyleO8rawValueAESgSi_tcfC' conflicts with old default '.weak.$s10Foundation9FormatterC11objectValueyypSgSSKF.default.$s10Foundation18ByteCountFormatterC5UnitsV8rawValueSuvg' in ByteCountFormatter.swift.obj

@tshortli
Copy link
Contributor

Sorry about that. Looks like I'll need to avoid making unavailable declarations weak on Windows.

@compnerd
Copy link
Member Author

@tshortli - another option would be to fix up the symbols so that they are coalesced properly through the application of COMDATs. There are examples in IRGen where we do this.

@Azoy
Copy link
Contributor

Azoy commented Mar 15, 2023

This good to go?

@compnerd compnerd merged commit b49f2ef into main Mar 15, 2023
@compnerd compnerd deleted the revert-64353-weak-link-unavailable-symbols branch March 15, 2023 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants