Skip to content

Stop using 'no_dead_strip' Mach-O section attribute on __swift5_protos, __swift5_proto, __swift5_types sections #39312

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
Sep 17, 2021

Conversation

kubamracek
Copy link
Contributor

@kubamracek kubamracek commented Sep 14, 2021

This is needed to for a future change, <apple#39313>, which will start to allow
under certain conditions to dead-strip unused types, protocols and conformances.

The globals emitted into these sections are already marked as used via addUsedGlobal() so they have desired "no dead stripping" effect already.

@kubamracek
Copy link
Contributor Author

@swift-ci please test

@kubamracek
Copy link
Contributor Author

@please test Windows platform

@kubamracek
Copy link
Contributor Author

@swift-ci please test Windows platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 9b8fac920cadc456400215f0cc12deff569cad9a

@kubamracek
Copy link
Contributor Author

@swift-ci please test Linux platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 9b8fac920cadc456400215f0cc12deff569cad9a

@kubamracek
Copy link
Contributor Author

@swift-ci please test Linux platform

@kubamracek
Copy link
Contributor Author

@swift-ci please test Windows platform

1 similar comment
@kubamracek
Copy link
Contributor Author

@swift-ci please test Windows platform

@compnerd
Copy link
Member

I don't see the harm in leaving this. More importantly, it avoids complications in the section attribute merging in LLVM.

@kubamracek
Copy link
Contributor Author

I don't see the harm in leaving this. More importantly, it avoids complications in the section attribute merging in LLVM.

Good point, but I actually do need to drop this "no_dead_strip" attribute from the section, for #39313. Suggestions?

@compnerd
Copy link
Member

Can we put that as the motivation into the commit message? That along with a check to verify that the symbols are marked with llvm.compiler.used, and this seems reasonable to unblock #39313

@kubamracek
Copy link
Contributor Author

Added test, improved commit message.

@kubamracek
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 9f67d0b75e22bd607705cb82bdc0e12048609c13

…s, __swift5_proto, __swift5_types sections

This is needed to for a future change, <swiftlang#39313>, which will start to allow
under certain conditions to dead-strip unused types, protocols and conformances.
@kubamracek
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - f3e564c

@kubamracek
Copy link
Contributor Author

@swift-ci please test Linux platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - f3e564c

@kubamracek
Copy link
Contributor Author

@swift-ci please test Linux platform

@kubamracek kubamracek merged commit 38df7b1 into swiftlang:main Sep 17, 2021
@kubamracek kubamracek deleted the no-no-dead-strip branch September 17, 2021 02:26
@kubamracek kubamracek restored the no-no-dead-strip branch September 17, 2021 02:27
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