Skip to content

build: hide symbols using CMake #31953

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
May 22, 2020
Merged

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented May 21, 2020

This uses the CMake settings to correctly select the visibility
attribute for the runtime.

Addresses rdar://63454568

This uses the CMake settings to correctly select the visibility
attribute for the runtime.
@compnerd
Copy link
Member Author

@edymtt - I think that this is a better approach to what you were trying to do. I'd still like to understand how this is a performance thing. These are not weak symbols, they are COMDATed symbols. However both of those do not incur a penalty - the weak symbol just means that if one is not provided it will be used, but the resolution is done once at load time.

@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

CC: @drexin

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 941681f

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 941681f

@mikeash
Copy link
Contributor

mikeash commented May 22, 2020

@compnerd This came from an internal verifier which says that weak symbols can impact app launch time. I'm not completely clear as to why, but I guess dyld has to do more work.

@compnerd
Copy link
Member Author

@mikeash Yes, that’s absolutely correct, the original statement of the reason just made it seem like the change caused a regression at runtime. Eric helped clear that up. Just a miscommunication on the actual results of the change.

@mikeash
Copy link
Contributor

mikeash commented May 22, 2020

@compnerd Yeah, it's always a bit tricky and weird when internal stuff bubbles up like this. Glad we're all on the same page now.

@edymtt
Copy link
Contributor

edymtt commented May 22, 2020

@swift-ci please test

@compnerd
Copy link
Member Author

@edymtt Ill go ahead and merge this, and then follow up with the tests for ensuring that this doesn't happen again in the future. Thanks for the help!

@compnerd compnerd merged commit 65962f1 into swiftlang:master May 22, 2020
@compnerd compnerd deleted the invisibility branch May 22, 2020 22:22
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.

4 participants