Skip to content

Commit

Permalink
Fix Android build for new NDK
Browse files Browse the repository at this point in the history
  • Loading branch information
kamgurgul committed May 17, 2020
1 parent c209221 commit edea245
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"C_Cpp.default.configurationProvider": "vector-of-bool.cmake-tools",
"files.associations": {
"cpuinfo.h": "c",
"typeinfo": "c"
}
}
11 changes: 4 additions & 7 deletions jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ LOCAL_MODULE := cpuinfo
LOCAL_SRC_FILES := \
src/init.c \
src/api.c \
src/linux/current.c \
src/cache.c \
src/linux/processors.c \
src/linux/smallfile.c \
src/linux/multiline.c \
src/linux/cpulist.c
ifeq ($(TARGET_ARCH_ABI),$(filter $(TARGET_ARCH_ABI),armeabi armeabi-v7a arm64-v8a))
ifeq ($(TARGET_ARCH_ABI),$(filter $(TARGET_ARCH_ABI),armeabi-v7a arm64-v8a))
LOCAL_SRC_FILES += \
src/arm/uarch.c \
src/arm/cache.c \
Expand All @@ -21,9 +21,6 @@ LOCAL_SRC_FILES += \
src/arm/linux/midr.c \
src/arm/linux/hwcap.c \
src/arm/android/properties.c
ifeq ($(TARGET_ARCH_ABI),armeabi)
LOCAL_SRC_FILES += src/arm/linux/aarch32-isa.c.arm
endif # armeabi
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
LOCAL_SRC_FILES += src/arm/linux/aarch32-isa.c
endif # armeabi-v7a
Expand Down Expand Up @@ -62,8 +59,8 @@ else
LOCAL_CFLAGS += -DCPUINFO_LOG_LEVEL=0
endif
LOCAL_STATIC_LIBRARIES := clog
include $(BUILD_STATIC_LIBRARY)

# include $(BUILD_STATIC_LIBRARY)
include $(BUILD_SHARED_LIBRARY)

$(call import-add-path,$(LOCAL_PATH)/deps)

Expand Down
4 changes: 2 additions & 2 deletions jni/Application.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_PLATFORM := android-15
APP_PLATFORM := android-16
APP_PIE := true
APP_STL := c++_static
APP_ABI := armeabi armeabi-v7a arm64-v8a x86 x86_64
APP_ABI := armeabi-v7a arm64-v8a x86 x86_64

0 comments on commit edea245

Please sign in to comment.