Skip to content
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

Use Bionic module from new Android overlay in Swift 6 instead #326

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

finagolfin
Copy link
Contributor

The new module and overlay were merged into Swift 6 in swiftlang/swift#74758.

I've been building and testing this package natively on Android for some time, but the addition of nullability annotations to Bionic with NDK 26 last year and the new Android overlay in the Swift compiler this summer required these changes.

The new module and overlay were merged into Swift 6 in swiftlang/swift#74758.
@@ -28,11 +30,16 @@ func start_thread(_ raw: UnsafeMutableRawPointer) -> UnsafeMutableRawPointer? {
Unmanaged<TaskDriver>.fromOpaque(raw).takeRetainedValue().run()
return nil
}
#elseif canImport(Glibc) || canImport(Musl)
#elseif (canImport(Glibc) && !os(Android)) || canImport(Musl)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These two changes get start_thread() working with Swift 5.10 and NDK 26 also, by changing the signature for the nullability annotations. That's why this is the only portion of this pull to check os(Android), because that's available in both Swift 5.10 and 6.

@FranzBusch
Copy link
Member

@swift-ci please test

@FranzBusch FranzBusch merged commit 2503842 into apple:main Aug 7, 2024
2 checks passed
@finagolfin finagolfin deleted the droid branch August 7, 2024 10:28
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