New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work with Android ndk r15 #1

berkus opened this Issue Jul 5, 2017 · 2 comments


None yet
1 participant

berkus commented Jul 5, 2017


  1. The compile time sysroot is now $NDK/sysroot. Previously this was $NDK/platforms/android-$API/arch-$ARCH.
  2. Pass -isystem $NDK/sysroot/usr/include/$TRIPLE when compiling. The triple has the following mapping:
Arch		Triple
ARM		arm-linux-androideabi
ARM64		aarch64-linux-android
MIPS		mipsel-linux-android
MIPS64		mips64el-linux-android
x86		i386-linux-android
x86_64		x86_64-linux-android

This is needed for architecture specific headers such as those in asm/ and machine/. We plan to teach Clang's driver to automatically search the architecture specific include directory, but that has yet to be done.
3. Pass -D__ANDROID_API__=$API when compiling. This define used to be provided by <android/api-level.h>, but with only one set of headers this is no longer possible. In the future we will look in to adding -mandroid-version or similar to Clang so this is automatic.
4. At link time, change nothing. All link time build behavior should match the legacy headers behavior. --sysroot should still point to $NDK/platforms/android-$API/arch-$ARCH/.


This comment has been minimized.


berkus commented Nov 6, 2017

As of 317b10c it does build with ndk r16-beta1.

Minor fixes needed to make filesystem build - those are supposedly fixed in ndk r16-beta2.


This comment has been minimized.


berkus commented Mar 9, 2018

Works with ndk r16, closing this.

@berkus berkus closed this Mar 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment