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. Signed-off-by: Tomasz Figa <tf...@chromium.org> --- src/gallium/auxiliary/Android.mk | 1 + src/gallium/auxiliary/util/u_cpu_detect.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/Android.mk b/src/gallium/auxiliary/Android.mk index 356390dfde..26938384fb 100644 --- a/src/gallium/auxiliary/Android.mk +++ b/src/gallium/auxiliary/Android.mk @@ -50,6 +50,7 @@ LOCAL_MODULE := libmesa_gallium LOCAL_STATIC_LIBRARIES += libmesa_nir LOCAL_WHOLE_STATIC_LIBRARIES += cpufeatures +LOCAL_CFLAGS += -DHAS_ANDROID_CPUFEATURES # generate sources LOCAL_MODULE_CLASS := STATIC_LIBRARIES diff --git a/src/gallium/auxiliary/util/u_cpu_detect.c b/src/gallium/auxiliary/util/u_cpu_detect.c index 76115bf8d5..265efe7b06 100644 --- a/src/gallium/auxiliary/util/u_cpu_detect.c +++ b/src/gallium/auxiliary/util/u_cpu_detect.c @@ -67,7 +67,7 @@ #include <unistd.h> #endif -#if defined(PIPE_OS_ANDROID) +#if defined(HAS_ANDROID_CPUFEATURES) #include <cpu-features.h> #endif @@ -304,7 +304,7 @@ PIPE_ALIGN_STACK static inline boolean sse2_has_daz(void) static void check_os_arm_support(void) { -#if defined(PIPE_OS_ANDROID) +#if defined(HAS_ANDROID_CPUFEATURES) AndroidCpuFamily cpu_family = android_getCpuFamily(); uint64_t cpu_features = android_getCpuFeatures(); -- 2.13.2.725.g09c95d1e9-goog _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev