Skip to content

[cxx-interop] Fix crash with reverse interop in Embedded Swift #75644

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
Aug 5, 2024

Conversation

Xazax-hun
Copy link
Contributor

Embedded Swift has a minimal runtime, some type metadata is not available. This patch works around a crash that tries to emit C++ briding to this non-existent Swift metadata. It is very likely that there will be more fallout in reverse interop, but this patch should fix the most glaring issue, crashing on an empty Embedded Swift project.

rdar://129030521

@Xazax-hun
Copy link
Contributor Author

@swift-ci please smoke test

@Xazax-hun Xazax-hun added the c++ interop Feature: Interoperability with C++ label Aug 2, 2024
@egorzhdan egorzhdan requested a review from kubamracek August 2, 2024 15:51
@Xazax-hun Xazax-hun force-pushed the gaborh/embedded-swift branch from c42305e to 639ffb9 Compare August 5, 2024 09:24
@Xazax-hun
Copy link
Contributor Author

@swift-ci please smoke test

Embedded Swift has a minimal runtime, some type metadata is not
available. This patch works around a crash that tries to emit C++
briding to this non-existent Swift metadata. It is very likely that
there will be more fallout in reverse interop, but this patch should fix
the most glaring issue, crashing on an empty Embedded Swift project.

rdar://129030521
@Xazax-hun Xazax-hun force-pushed the gaborh/embedded-swift branch from 639ffb9 to a05b305 Compare August 5, 2024 09:47
@Xazax-hun
Copy link
Contributor Author

@swift-ci please smoke test

@Xazax-hun
Copy link
Contributor Author

@swift-ci please smoke test linux

Copy link
Contributor

@egorzhdan egorzhdan left a comment

Choose a reason for hiding this comment

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

I'm not an expert in embedded Swift, but this LGTM from the C++ interop standpoint.

@Xazax-hun
Copy link
Contributor Author

Since this issue completely blocks potential early adopters of Embedded Swift and reverse C++ interop, I merge this. In case anyone has anything to add, I plan to address that in a follow-up PR.

@Xazax-hun Xazax-hun merged commit 5424ddd into main Aug 5, 2024
3 checks passed
@Xazax-hun Xazax-hun deleted the gaborh/embedded-swift branch August 5, 2024 17:08
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++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants