Swift cross compile to single linux binary

Viewed 3030

Is it possible to compile a swift binary from an OS X computer so that it runs on a server running Linux as a single binary without no extra libraries that need to be dynamically linked?

I'm thinking something like passing a -target to the swift command and passing another parameter to let it statically link all dependencies, but I'm not sure what the exact commands are.

The exact value for -target seems to be rather elusive.

Do I need to know the exact target distribution to be able to pass the correct string to the -target parameter?

2 Answers
Related