Skip to content
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

[SR-9832] default valued argument thunks are emitted with strong linkage and weak linkage multiply #52249

Closed
compnerd opened this issue Feb 1, 2019 · 2 comments
Assignees
Labels
compiler The Swift compiler in itself

Comments

@compnerd
Copy link
Collaborator

compnerd commented Feb 1, 2019

Previous ID SR-9832
Radar None
Original Reporter @compnerd
Type Sub-task
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Sub-task
Assignee @compnerd
Priority Medium

md5: d5c419b59acc2eff178a21a7ddfe9fa7

Parent-Task:

Issue Description:

The multiple definition to avoid the duplicate definition only works on ELF and MachO due to the weak linking semantics. This does not work for PE/COFF binaries. We should always emit the definitions as `weak_odr` and declarations as `external` so that the symbols can always be COMDATed. The `weak_odr` linkage is needed (as opposed to `linkonce_odr`) to ensure that the symbol is emitted even when unreferenced.

@compnerd
Copy link
Collaborator Author

compnerd commented Feb 1, 2019

CC: @slavapestov @jckarter

@compnerd
Copy link
Collaborator Author

compnerd commented Feb 2, 2019

#21539

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

1 participant