<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><div>Hello,</div><div><br></div><div>I'm currently working on adding support to the Swift compiler to allow it to target Android. Currently I've managed to get the stdlib to compile after hacking&nbsp;around/disabling&nbsp;a bunch of stuff (the custom linker script, the dl_iterate_phdr stuff, and the posix_spawn support), and managed to compile and run&nbsp;the simplest proof-of-concept&nbsp;&nbsp;(import Glibc; exit(42)).</div><div><br></div><div>My fork is located at <a href="https://github.com/SwiftAndroid/swift" target="_blank">https://github.com/SwiftAndroid/swift</a>&nbsp;and I would really appreciate any comments and suggestions.</div><div><br></div><div>In particular, I would like some help on the following issues:</div><div><br></div><div><div>- The current build system assumes that the host and the target has the same version of libicu. Android doesn't ship with libicu, so I had to point the build script to a copy of libicu manually. However, the same ICU&nbsp;include path is used to compile all target stdlibs,including the host one, so I had to make sure that my libicu headers matches the host one.&nbsp;Is there a way for me to specify in the build system to use a different libicu for one of the targets?</div><div><br></div><div>- The current stdlib&nbsp;build system also assumes that the host and the target are of the same OS family, so currently only Linux hosts can target Android. Is there anything I can do to allow Mac hosts to also target Android?</div><div><br></div><div>- What's the role of the special&nbsp;linker script, and what's the purpose of the conformance tables in shared libraries?&nbsp;I've commented the conformance table loading code&nbsp;out on Android;&nbsp;is that&nbsp;why 'print("Hello world")' prints out "String(" infinity?</div><div><br></div><div>- How should Swift integrate with the Android NDK?</div><div><br></div></div><div>- The version of Clang shipped with Ubuntu 15.10 can't seem to find the arm-linux-androideabi-ld linker even though I've pointed it to the Android NDK's copy via -gcc-toolchain. It only seems to check /usr/bin/armv7-none-linux-androideabi-ld before falling back to /usr/bin/ld. The Clang&nbsp;from the Android NDK can find&nbsp;the NDK ld&nbsp;fine. Is there a particular command line option I need to pass into the Ubuntu clang to make it look for the arm-linux-androideabi-ld in the gcc-toolchain folder?</div><div><br></div><div>Thank you for your help and for your work on Swift.</div><div><br></div><div>Zhuowei Zhang</div>                                               </div></body>
</html>