Skip to content

[embedded] Make CMO's 'serialize everything' mode even more aggressive and allow serialization of private and shared functions #68727

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 2 commits into from
Sep 24, 2023

Conversation

kubamracek
Copy link
Contributor

This implements a (more) complete "alwaysEmitIntoClient" model on the module serialization side for embedded Swift as mentioned in https://github.com/apple/swift-evolution/blob/488e96672f2f54bbe0716dfe63cc5df753c3436f/visions/embedded-swift.md. Currently, CMO's serialization is still excluding several kinds of functions from being serialized (even in the "full" serialization mode), and that is problematic for embedded Swift. One concrete case is shown in an added testcase, where a specialization of a function from the stdlib is not serialized and ends up missing on the library client side and causes a link failure. The PR adds a real "serialize everything" mode to CMO and turns that on for embedded Swift.

Take 2, first attempt caused a SILVerifier failure and was reverted.

@kubamracek
Copy link
Contributor Author

@swift-ci please test

@kubamracek kubamracek added the embedded Embedded Swift label Sep 23, 2023
@kubamracek kubamracek merged commit f88c919 into swiftlang:main Sep 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
embedded Embedded Swift
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant