[Toybox] What am I doing wrong with ndk-r20?

enh enh at google.com
Wed Oct 9 09:27:25 PDT 2019


On Wed, Oct 9, 2019 at 9:08 AM Rob Landley <rob at landley.net> wrote:
>
> On 10/7/19 3:54 PM, enh wrote:
> > d'oh. that seems to be a real bug... __ANDROID_NDK__ went missing
> > between r19 and r20. congratulations on being the first person to
> > notice!
>
> Most people aren't building as part of AOSP _and_ with the NDK. :)

well, depends what you mean by "with the NDK". the tricky part in the
platform is whether building for the platform but with a lower target
API level should count as "NDK" or not. that's why the plan is to put
__ANDROID_NDK__ (which really just means "built in a context where it
was targeting a published API level") back even though we also have
__NDK_MAJOR__ and friends which tell you exactly what version of the
NDK you're being built with (or aren't defined at all if you're being
built with the platform). similar to how there's __ANDROID__ versus
__BIONIC__ versus __linux__ depending on exactly what you're trying to
say.

> > it looks like the removal was my fault, though i can't understand why
> > i did it now (because there wasn't nearly enough detail in my commit
> > message).
> >
> > https://android-review.googlesource.com/c/platform/bionic/+/1135146
> > reverts the change that broke this.
>
> Sigh, should I add that to the compile time probes to work with the exiting NDK,
> or is there a new release soon?

well, r21beta1 was supposed to be tomorrow, but we're having Windows
issues. but, yeah, pretty soon.

if you want a quick hack, and don't care about _old_ versions of the
NDK (which you don't, because they can't build toybox anyway), you
could replace __ANDROID_NDK__ with __NDK_MAJOR__. that should fix r20
and also work for r19 and r21 (and the OS, because it won't be set
there, which is intended in this case).

> Rob



More information about the Toybox mailing list