Skip to content

Conversation

@compnerd
Copy link
Member

@compnerd compnerd commented Mar 1, 2022

The linkage inferred by internal linking is overly restrictive. It uses
the "internal linkage type" which is for translation unit local symbols,
that is static storage. These symbols participate in linking and need
to be given external storage but hidden visibility and no DLL storage in
static linking. This permits them to participate in symbolic resolution
during linking but are made module local, not LLVM module local.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

The linkage inferred by internal linking is overly restrictive.  It uses
the "internal linkage type" which is for translation unit local symbols,
that is `static` storage.  These symbols participate in linking and need
to be given external storage but hidden visibility and no DLL storage in
static linking.  This permits them to participate in symbolic resolution
during linking but are made module local, not LLVM module local.
@compnerd
Copy link
Member Author

compnerd commented Mar 1, 2022

CC: @aschwaighofer

@compnerd
Copy link
Member Author

compnerd commented Mar 1, 2022

@swift-ci please test

Copy link
Contributor

@aschwaighofer aschwaighofer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@compnerd compnerd merged commit 4cc21f4 into swiftlang:main Mar 1, 2022
@compnerd compnerd deleted the linkage branch March 1, 2022 20:23
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.

2 participants