-
Notifications
You must be signed in to change notification settings - Fork 304
Android: add native support #210
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
case .darwin: return "dylib" | ||
case .linux: return "so" | ||
case .linux, .android: return "so" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know you could do this in my earlier pull, so modified it now.
@@ -62,9 +62,11 @@ public struct DLOpenFlags: RawRepresentable, OptionSet { | |||
public static let deepBind: DLOpenFlags = DLOpenFlags(rawValue: 0) | |||
#else | |||
public static let first: DLOpenFlags = DLOpenFlags(rawValue: 0) | |||
#if !os(Android) | |||
public static let deepBind: DLOpenFlags = DLOpenFlags(rawValue: RTLD_DEEPBIND) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'-Xlinker', '-rpath', '-Xlinker', '$ORIGIN/../lib/swift/android', | ||
# SwiftPM will otherwise try to compile against GNU strerror_r on | ||
# Android and fail. | ||
'-Xswiftc', '-Xcc', '-Xswiftc', '-U_GNU_SOURCE', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@swift-ci please test |
With this pull, I got this repo built and tested natively on Android in the Termux app. It shows no failures in the tests, even though the test output dumps a bunch of non-XCTest warnings and errors, just like on the linux CI.