(Cross-)Compiling Swift for Raspberry Pi

Cross-compile Swift code for Raspberry Pi on macOS

To answer my own question, the current best solution (very recent) is:
https://github.com/CSCIX65G/swift-mac2arm-x-compile-toolchain

That provides the needed toolchains, etc. for building on macOS for the R Pi.
Best instructions for remote debugging (using lldb) can be found here:
https://lldb.llvm.org/use/remote.html

Note that on macOS you need to use the version of lldb provided by the toolchain, e.g.:

[path_to_toolchains]/Toolchains/arm64-swift.xctoolchain/usr/bin/lldb -o "platform select remote-linux" -o "platform connect connect://ipaddress:port" -o "file ./remoteProgram"

Still looking to connect the lldb debugger to Xcode run on the Mac. If that can be done, the development cycle is complete.

How can I compile my own copy of Swift from source for Raspbian

If you go to https://github.com/uraimo/buildSwiftOnARM you will find all the info you need to build your own Swift on Raspbian.

There is also an updated Repository for Swift installs on Arm Devices including the Raspberry Pi. - https://swift-arm.com/2019/01/07/official-swift-arm-community-releases/

The Raspbian builds on the repo are from uraimo that I have packaged myself.

I understand your "inherently distrusting" but these are not anonymously posted binaries but the work of the "swift on arm" community.

You are welcome to join the swift-arm slack and talk to the people doing the building. They are more than happy to help you achieve your own builds.
https://launchpass.com/swift-arm

Neil.



Related Topics



Leave a reply



Submit