The compile time sysroot is now $NDK/sysroot. Previously this was $NDK/platforms/android-$API/arch-$ARCH.
Pass -isystem $NDK/sysroot/usr/include/$TRIPLE when compiling. The triple has the following mapping:
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/.