>
> Is a Linux / ARM port on the horizon? I'm interested in using Swift with
> Rasberry Pi
We don't have resources to develop the port ourselves, but Swift ports
to non-x86 architectures are most welcome!
Any pointers or existing docs to look at regarding bringup against new
architectures?
I'd attack this problem in this order:
* Make C++ pieces build, while not breaking existing platforms:
** Make build-script-impl invoke cmake on your platform.
** Make the required cmake changes (hopefully close to none).
** Make the C++ compiler code build with your C++ compiler and standard library.
** Implement the necessary plumbing for running tests, remotely on the
target device, if you are cross-compiling.
* Checkpoint: make ./validation-test/stdlib/MicroStdlib.swift test pass.
* Make the standard library build:
** Make the runtime build.
** Make the core standard library and StdlibUnittest build.
* XFAIL all failing tests for your platform.
* Make validation-test/stdlib/StdlibUnittest* tests pass. This will
likely involve fixing a few portability issues in the library and the
runtime.
* Make the rest of the tests pass incrementally.
I'm definitely interested in Linux-ARM as a target as well (cross-compiled
more interesting than self-hosted).
Do you mean building a cross-compiler, or cross-compiling the swift
compiler for ARM?
I'd hope, given it's based on LLVM and targets IOS-ARM, that this would not
be a horribly complex thing to attempt.
Since it is an ELF platform, and running Linux, I don't expect major issues.
Dmitri
···
On Thu, Dec 3, 2015 at 4:50 PM, Brian Swetland <swetland@frotz.net> wrote:
On Thu, Dec 3, 2015 at 3:59 PM, Dmitri Gribenko <gribozavr@gmail.com> wrote:
On Thu, Dec 3, 2015 at 3:50 PM, David Abraham <sirdavidabraham@gmail.com> >> wrote:
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr@gmail.com>*/