Skip to content

[embedded] Include and use cxxshims in the embedded/ resource dir #78147

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 3 commits into from
Dec 13, 2024

Conversation

kubamracek
Copy link
Contributor

@kubamracek kubamracek commented Dec 12, 2024

We did not have the libcxxshim.h and the modulemap in the embedded/ resource dir (only in macos/, etc.) previously. This should resolve compiler crashes when we need to emit calls to __swift_interopStaticCast while in Embedded Swift mode.

Attached testcase without this fix crashes the compiler with:

Assertion failed: (wrapperModule && "CxxShim module is required when using members of a base class. " "Make sure you `import CxxShim`."), function getInteropStaticCastDeclRefExpr, file ClangImporter.cpp, line 5205.
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.

@kubamracek
Copy link
Contributor Author

@swift-ci please test

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.

LGTM, thanks!

@kubamracek
Copy link
Contributor Author

@swift-ci please test

@kubamracek kubamracek enabled auto-merge December 12, 2024 23:09
@kubamracek
Copy link
Contributor Author

@swift-ci please test

@kubamracek kubamracek merged commit 7946bf7 into swiftlang:main Dec 13, 2024
4 of 5 checks passed
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