Skip to content

[6.0] Fix two problems with -cross-module-optimization #74930

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
Jul 3, 2024

Conversation

eeckstein
Copy link
Contributor

@eeckstein eeckstein commented Jul 3, 2024

  • Explanation: Fixes two compiler crashes when building projects with -cross-module-optimization: one problem in MandatoryPerformanceOptimizations (it needs to consider empty global-init-once functions) and one problem in the Deserializer (handle the case that for de-serialized globals there might not be a var-declaration available in the module file)
  • Scope: Affects projects built with -cross-module-optimization
  • Risk: Low. The changes are trivial and only handle cases, which would otherwise run into compiler crashes
  • Testing: Tested by a test case
  • Issue: rdar://130406651, Swift 5.10 crashing when -cross-module-optimization is enabled #73487
  • Reviewer: @meg-gupta
  • Main branch PR: Fix two problems with -cross-module-optimization #74893

eeckstein added 2 commits July 3, 2024 11:05
…-once functions

Instead ignore empty global-init-once functions

swiftlang#73487
rdar://130041582
…mization

In case of cross-module-optimizations it can happen that a private global variable is changed to public,
but it's declaration is not available in the module file.
@eeckstein eeckstein requested a review from a team as a code owner July 3, 2024 09:13
@eeckstein eeckstein requested a review from meg-gupta July 3, 2024 09:14
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein eeckstein merged commit 1d20b96 into swiftlang:release/6.0 Jul 3, 2024
5 checks passed
@eeckstein eeckstein deleted the fix-cmo-problems-6.0 branch July 3, 2024 17:35
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