Skip to content

[Package CMO] Require library-evolution flag. #76278

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 6, 2024
Merged

[Package CMO] Require library-evolution flag. #76278

merged 2 commits into from
Sep 6, 2024

Conversation

elsh
Copy link
Contributor

@elsh elsh commented Sep 5, 2024

This PR ensures library-evolution is enabled for Package CMO; without it, it previously fell back to regular CMO, which caused mismatching serialization attributes if importing another module that had Package CMO enbaled, causing an assert fail for loadable types.

Resolves rdar://135308288&135276295

This PR ensures library-evolution is enabled for Package CMO; without it,
it previously fell back to regular CMO, which caused mismatching serialization
attributes if importing another module that had Package CMO enbaled, causing
an assert fail for loadable types.

Resolves rdar://135308288
@elsh
Copy link
Contributor Author

elsh commented Sep 5, 2024

@swift-ci smoke test

@elsh elsh requested a review from nkcsgexi September 5, 2024 13:08
if (M.getSwiftModule()->isResilient() &&
!M.getSwiftModule()->serializePackageEnabled())
if (M.getSwiftModule()->serializePackageEnabled()) {
assert(M.getSwiftModule()->isResilient() &&
Copy link
Contributor

Choose a reason for hiding this comment

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

In addition to the assert, we should also return when M is resilient.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup it's in the else if line below

Copy link
Contributor

Choose a reason for hiding this comment

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

oh, I see. Thank you!

Update tests
@elsh
Copy link
Contributor Author

elsh commented Sep 5, 2024

@swift-ci smoke test

@elsh elsh changed the title [Package CMO] Diagnose missing library-evolution flag. [Package CMO] Require library-evolution flag. Sep 5, 2024
@elsh elsh merged commit d653a01 into main Sep 6, 2024
3 checks passed
@elsh elsh deleted the elsh/pcmo-diags branch September 6, 2024 03:56
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