Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
What's in this pull request?
This adds an Android target for the stdlib. It is also the first example of cross-compiling outside of Darwin: a Linux host machine builds for an Android target.
Relevant mailing list discussions:
The Android variant of Swift may be built and tested using the following
Android builds have the following dependencies, as can be seen in the build script invocation:
What's worth discussing about this pull request?
Continuous integration: I'd be thrilled to have this merged into the main Swift repository, but I don't want to dump a bunch of code that no one can maintain. I think CI is a very important part of maintaining a healthy build, but:
Do either of those sound like something CI servers could be configured with? Or can someone help me think of alternatives--perhaps building libicu as part of the Swift build, as we do with
FIXMEs: There are quite a few spots labeled "FIXME" that I could use some help with. Feedback welcome!
Thanks a ton to @zhuowei, who deserves the vast majority of the credit. I just tweaked a few things.
First off, thank you for this awesome work!
My personal rule is: if you make sense to be between those two changes (ie. have one but not the other), put them in separate commits. You should obviously order those commits in a way that ensures you don't use features before adding them. For instance, the last commit should be the one adding the new target to
Thanks for the feedback, @1ace! I agree: this work depends on #1396, #1410, #1426, #1395, #1334, which I've issued separately to make them easier to review. Unfortunately, GitHub falls apart with a dependent stack of commits, such as this pull request would end up being. I think you'll find other ports, such as Cygwin #1108, end up being similarly large.
The problem is that all of these changes are directly related to Android. Take the
Of course, if the review unearths more pieces I can split out into separate pull requests, I'll definitely do so!
I'm working on addressing the feedback--thanks so much for the review, @gribozavr!
In the meantime, if anyone out there wants to help with this pull request, here's the output from the test suite: https://gist.github.com/modocache/48babfa768d495806116. Six tests are failing.
Some of those failures, like
It's one very good new for developers, for many companies, they have IOS and Android version for every application, it will reduce the effort. Xamarin is another option, but Linux based system should support swift well. I love Swift. Wish it will become usable for real case soon.