Skip to content

[cxx-interop][android] link with CxxStdlib when building for Android too #74603

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
Jun 25, 2024

Conversation

hyp
Copy link
Contributor

@hyp hyp commented Jun 21, 2024

No description provided.

@hyp hyp requested review from hborla, slavapestov and xedin as code owners June 21, 2024 01:18
@hyp
Copy link
Contributor Author

hyp commented Jun 21, 2024

Still needs a test, but testing on adopters now.

@hyp hyp requested review from compnerd and hjyamauchi June 21, 2024 01:19
@hyp
Copy link
Contributor Author

hyp commented Jun 21, 2024

@swift-ci please smoke test

@hyp
Copy link
Contributor Author

hyp commented Jun 21, 2024

CC @finagolfin

case llvm::Triple::Win32: {
RegistrationCallback(
LinkLibrary(hasStaticCxxStdlib ? "libswiftCxxStdlib" : "swiftCxxStdlib",
LibraryKind::Library));
break;
}
default:
if (Target.isOSDarwin())
if (Target.isOSDarwin() || Target.isOSLinux())
Copy link
Member

Choose a reason for hiding this comment

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

I guess that BSD is still out otherwise it would be nice to collapse this switch.

@finagolfin
Copy link
Member

I don't know much about this, as I don't use C++ Interop myself, and never noticed this affecting the Interop tests in the compiler validation suite. Now that you enabled building this library for Android in an earlier pull, I had a problem building this library in Termux with the latest June 13 trunk snapshot because of a C++ Interop error, so I disabled building it again for now, but will try it again soon. If you need it and it works for you, this pull sounds good to me.

Speaking of the latest trunk source snapshot, I was finally able to build it and run the compiler validation suite and I'm happy to report that your Bionic modularization fixed a bunch of C++ Interop tests natively in Termux also, once I elided a few Bionic header changes in the Termux app, including the stdint.h issue I mentioned earlier this week. I will clean everything up next and submit a pull enabling several C++ Interop tests that were previously disabled for Android, since they pass now. 😃

Any reason you haven't submitted your Android stdlib changes for the 6.0 branch yet?

@hyp
Copy link
Contributor Author

hyp commented Jun 21, 2024

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented Jun 21, 2024

It looks like some of the existing C++ interop runtime tests will cover this for Android.

@hyp
Copy link
Contributor Author

hyp commented Jun 22, 2024

@swift-ci please test macOS platform

@hyp hyp merged commit b51b8d2 into swiftlang:main Jun 25, 2024
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.

4 participants