-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[IRGen] Use PrivateLinkage for @__Swift_AST
global
#84349
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
[IRGen] Use PrivateLinkage for @__Swift_AST
global
#84349
Conversation
`.swift_ast` section is now recognized as a "metadata" section by LLVM's object emission. On WebAssembly, metadata symbols must not appear in the object file symbol table. Therefore, change the linkage of the `@__Swift_AST` global from InternalLinkage to PrivateLinkage to avoid exposing the symbol. swiftlang/llvm-project@555eaef
@swift-ci smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable to me.
Does the corresponding LLVM patch also existing on the branch that |
The commit is not included in the current stable llvm branch swift's main uses but it's included in the new rebranch. This is a fix to unblock the ongoing test failures on rebranch |
Should this change be merged to I am inferring that possibility from the comment on the
|
I think it's safe to apply the LLVM change and this change independently, because a private loadable global var should remain in the object file. Correct me @hyp if my understanding is incorrect. |
Aah, I misread/misunderstood what the LLVM change does: it allows for stripping the symbol, not as I initially read it, prevent it. |
@swift-ci please smoke test Linux |
1 similar comment
@swift-ci please smoke test Linux |
.swift_ast
section is now recognized as a "metadata" section by LLVM's object emission. On WebAssembly, metadata symbols must not appear in the object file symbol table. Therefore, change the linkage of the@__Swift_AST
global from InternalLinkage to PrivateLinkage to avoid exposing the symbol.swiftlang/llvm-project@555eaef