I have just pushed a branch to the SwiftAndroid repo that is at the stage of correctly compiling the swift toolchain and stdlib objects for android-armv7 and macosx-x86_64 (as verified using nm from the different toolchains): https://github.com/SwiftAndroid/swift/tree/osx-crosscompile. The problem is it fails at the linker stage.
Basically the OSX linker doesn't understand the “—sysroot” option (See AddSwift.cmake:59). Up until that point though (throughout the compiling stage), we need that option because otherwise the Android components attempt to use OSX /usr/include, which throws all sorts of errors because of wrong architecture etc. Why it fails to compile when I remove the “—sysroot” option, but also fails _with_ it in the link stage will probably be key to fixing this. Again, it seems that what we really need to do is use the Android linker, not the Xcode one.
I'm going to try figure out how to do that tomorrow but not confident I’ll get far given my limited experience with this.. This work may also be of interest to the Raspberry Pi / BeagleBoard folks, would also love to hear some opinions about how to solve the CMAKE_SYSTEM_NAME problem, that will also affect cross-compilation for those uses. In any case, any hints or collaborators would be most welcome.