Skip to content

🍒[cxx-interop] Workaround compiler error when importing AppKit/UIKit with C++ interop #78742

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

Conversation

porglezomp
Copy link
Contributor

  • Explanation: The AppKit/UIKit overlay refers to symbols declared via NS_OPTIONS macro, which is causing issues in the C++ language mode due to the macro definition being different. This teaches the module interface loader to drop the C++ interop flag when rebuilding the AppKit/UIKit overlays from their interface.
  • Scope: This changes the compiler flags used to rebuild AppKit/UIKit when C++ interop is enabled.
  • Issues: rdar://143033209
  • Original PRs: [cxx-interop] Workaround compiler error when importing AppKit/UIKit with C++ interop #78694
  • Risk: Low, this only affects rebuilding of a single SDK module from its interface when C++ interop is enabled.
  • Testing: Unit testing, manual testing against code where this was discovered.
  • Reviewers: @Xazax-hun

This is the same as #78657 but with different modules.

…ith C++ interop

The AppKit/UIKit overlay refers to symbols declared via NS_OPTIONS
macro, which is causing issues in C++ language mode due to the macro
definition being different. This teaches the module interface loader to
drop the C++ interop flag when rebuilding the AppKit and UIKit overlay
from its interface.

This is the same fix as swiftlang#78636, but for different modules.

rdar://143033209
(cherry picked from commit 7323a75)
@porglezomp porglezomp added c++ interop Feature: Interoperability with C++ 🍒 release cherry pick Flag: Release branch cherry picks labels Jan 19, 2025
@porglezomp porglezomp requested a review from a team as a code owner January 19, 2025 13:00
@porglezomp porglezomp changed the title [cxx-interop] Workaround compiler error when importing AppKit/UIKit w… 🍒[cxx-interop] Workaround compiler error when importing AppKit/UIKit with C++ interop Jan 19, 2025
@porglezomp
Copy link
Contributor Author

@swift-ci please test

@porglezomp
Copy link
Contributor Author

@swift-ci please test

@swiftlang swiftlang deleted a comment from nate-one-1978 Jan 20, 2025
@porglezomp
Copy link
Contributor Author

We resolved this with a different workaround approach, I'm going to decline this.

@porglezomp porglezomp closed this Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++ 🍒 release cherry pick Flag: Release branch cherry picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants