From 14efabbf1c20a43e46b7784dce0e8d13c4c4715b Mon Sep 17 00:00:00 2001 From: James Zern Date: Thu, 20 Aug 2015 01:25:37 +0000 Subject: [PATCH] Android: limit use of cpufeatures cpufeatures is only used with armeabi-v7a.* Change-Id: I80284061d71d9defa50d139c7f1bda67c00f567e --- Android.mk | 9 +++++++-- src/dsp/cpu.c | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Android.mk b/Android.mk index 340e22c2..a8f1cc29 100644 --- a/Android.mk +++ b/Android.mk @@ -15,6 +15,7 @@ ifneq ($(findstring armeabi-v7a, $(TARGET_ARCH_ABI)),) # instructions to be generated for armv7a code. Instead target the neon code # specifically. NEON := c.neon + USE_CPUFEATURES := yes else NEON := c endif @@ -149,7 +150,9 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)/src # prefer arm over thumb mode for performance gains LOCAL_ARM_MODE := arm -LOCAL_STATIC_LIBRARIES := cpufeatures +ifeq ($(USE_CPUFEATURES),yes) + LOCAL_STATIC_LIBRARIES := cpufeatures +endif LOCAL_MODULE := webpdecoder_static @@ -241,4 +244,6 @@ endif include $(LOCAL_PATH)/examples/Android.mk -$(call import-module,android/cpufeatures) +ifeq ($(USE_CPUFEATURES),yes) + $(call import-module,android/cpufeatures) +endif diff --git a/src/dsp/cpu.c b/src/dsp/cpu.c index 0f8107e7..35c2af7f 100644 --- a/src/dsp/cpu.c +++ b/src/dsp/cpu.c @@ -13,7 +13,7 @@ #include "./dsp.h" -#if defined(__ANDROID__) +#if defined(WEBP_ANDROID_NEON) #include #endif