[PATCH] D26385: Define __ANDROID_API__ for all Android builds.

Stephen Hines via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 8 11:06:32 PST 2016


srhines added a comment.

In https://reviews.llvm.org/D26385#589534, @danalbert wrote:

> > This macro (along with ANDROID) should always be defined for Android targets.
>
> What if only `arm-linux-androideabi` (without a version) is specified? We should be falling back to the old behavior (don't defined `__ANDROID_API__`) when that happens since that's what every build system out there is going to be relying on.


It is defines with a value of 0. This allows you to actually do something better, IMO. You can now handle old or new NDKs by seeing if this is defined to a special level, or 0 for no level, or not defined at all (old toolchain, build rules, etc.). Does that make sense?


https://reviews.llvm.org/D26385





More information about the cfe-commits mailing list