gallium: auxiliary: Fix standalone Android build of u_cpu_detect (v2)
authorTomasz Figa <tfiga@chromium.org>
Tue, 18 Jul 2017 07:20:52 +0000 (16:20 +0900)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 19 Jul 2017 12:28:23 +0000 (13:28 +0100)
commit107b9c70d04c381d5517582d67925a29eac6eac4
tree4725ce82c62952a861b3c5988f9ba2b70bd2c1e9
parent644ac2b780366582fe1fee9a677b1f6a508e65dc
gallium: auxiliary: Fix standalone Android build of u_cpu_detect (v2)

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.

Fix it by defining HAS_ANDROID_CPUFEATURES in Android.mk and replacing
respective #ifdefs to use it instead.

v2:
 - Add a comment explaining why the separate flag is needed (Emil).

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/gallium/auxiliary/Android.mk
src/gallium/auxiliary/util/u_cpu_detect.c