Swift on android could use help from swift linux people!

Hey, VGorloff is bringing up new concurrency on android - can someone advise him on process? I’m guessing Linux people who built the Linux 5.5 concurrency stuff have great stuff to share.

1 Like
1 Like

I've had this working since soon after Swift 5.5 was released last year, try it out with my recent Swift 5.5.2 SDK for Android. You can build using that with any Swift 5.5.2 compiler on linux and probably with the Homebrew bottle for Swift on macOS (the official Xcode Swift toolchain may not work because it adds some proprietary bits).

I just tried cross-compiling this sample async file from Linux x86_64 to Android AArch64 by using this command with the additional flags -parse-as-library -use-ld=lld -Xlinker -rpath -Xlinker \$ORIGIN/swift-5.5.2-android-aarch64-24-sdk/usr/lib/swift/android, then copied the executable and SDK to the same directory on an Android device and it ran without a problem.

You can follow the instructions in my README from the first SDK link above to cross-compile your larger Swift packages with SPM, or even cross-compile Android SDKs yourself.

Terms of Service

Privacy Policy

Cookie Policy