Clang for Android ARM (wrap-up)

Hi there.

I’m still trying to compile for ARM android and it’s just a hell :wink:

  • On mac linker does not support ‘with-version’ argument (i’ve asked for it and did not get any solution except DIY)
  • on linux 64 bit (VM) it’s including “-L/lib64” to linker and it fails to link
  • compiled with armeabihf toolchain can’t be linked as ndk does not support linking with hard-float.
  • compiled with armeabi toolchain can’t be loaded as it fails to find
  • compilation with standalone toolchain from android ndk fails because of futimes() and futimens() function not found.

Last time i’ve found repo (also externa/clang and external/compiler-rt)
but they can’t be compiled using standalone toolchain from ndk because of source code errors (“master” branch because of cast error, “jb-release” because of no getsid() function definition). This repo seems to be internal source code which can be not ready to be used for not android OS developer, so no wonder.

Is there anyone who did it once (or who can do it) at least (since i’m android developer and it’s pretty difficult to solve all this issues for me)?

Hi Anton,

I feel your pain, and I also appreciate the full report, since I was
cataloguing the problems of using Clang in cross-compilation environments,
and using Clang on Android is particularly interesting.

I haven't done it myself, so I can't help you either, but there is another
mailing list that could help you:

LLVM Linux <>

They mainly compile the kernel with Clang, but they also compile a full
Android stack, boot it and test it, so they may know the magic runes to get
Clang into Android.


Okay, thanks for the link - i will give it a try.