[swift-dev] Cross-compile for Android armv7 from OSX

Chris Bieneman beanz at apple.com
Fri Jan 22 11:50:03 CST 2016

> On Jan 22, 2016, at 9:30 AM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
> On Fri, Jan 22, 2016 at 9:26 AM, ChrisBieneman <beanz at apple.com> wrote:
>> Can I provide an alternate suggestion?
>> Clang can be cross-compiled for alternate platforms with seemingly a single CMake invocation. This is accomplished by having a model where the user configures the cross-build, and LLVM's CMake detects that you are cross compiling and it handles configuring the host tools and hooking the dependencies up.
>> This does lead to some pretty gnarly CMake scripting, but I think it provides a very good user experience.
>> As an example instructions for cross-compiling LLVM are here: http://llvm.org/docs/GettingStarted.html#cross-compiling-llvm
>> That simple configuration command handles everything, all a user has to do is run ninja once.
> Does that ninja command invoke multiple sub-ninja commands?

Yes. The top-level ninja will put them in the console job pool which results in their output being directly piped to the parent, and only one will execute at a time which allows them to not conflict with each other.

Alternatively if a user were to use make, it just becomes a recursive make call and the standard make IPC gets used to coordinate between the processes.


> Dmitri
> -- 
> 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 at gmail.com>*/

More information about the swift-dev mailing list