[Mesa-dev] [PATCH] gallium: auxiliary: Fix standalone Android build of u_cpu_detect

Tomasz Figa tfiga at chromium.org
Thu Jul 6 01:18:05 UTC 2017


On Thu, Jul 6, 2017 at 2:49 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> Hi Tomasz,
>
> On 5 July 2017 at 15:58, Tomasz Figa <tfiga at chromium.org> wrote:
>> Commit 463b7d0332c5("gallium: Enable ARM NEON CPU detection.")
>> introduced CPU feature detection based Android cpufeatures library.
>> Unfortunately it also added an assumption that if PIPE_OS_ANDROID is
>> defined, the library is also available, which is not true for the
>> standalone build without using Android build system.
>>
> I guess the key question is:
>
> Does building Mesa in CrOS sets the ANDROID macro? Seemingly not.
> Should we consider doing that or not?

Well, it depends what you mean by "building Mesa in CrOS". If the
target is CrOS (i.e. the Mesa libraries used by Chrome), then ANDROID
and similar macros are not set. If the target is Android container
(i.e. the Mesa libraries loaded by Android apps), then all
ANDROID-related flags are supposed to be set as in a regular Android
build. Obviously my patch changes this a bit, because
HAS_ANDROID_CPUFEATURES. However I don't think the CPU features
library can be handled outside of the Android build system and so this
notion of "optional feature" here.

>
> Thanks
> Emil


More information about the mesa-dev mailing list