Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android build for ARMv7, x86 and x86_64. #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ android {
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
abiFilters 'arm64-v8a'
}
externalNativeBuild {
ndkBuild {
cppFlags '-std=c++17', '-DUSE_PTHREADS', '-DNDEBUG', '-O3', '-DIS_64BIT', '-DUSE_POPCNT', '-DUSE_NEON'
}
}
}
externalNativeBuild {
ndkBuild {
Expand Down
18 changes: 17 additions & 1 deletion android/jni/Application.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,21 @@ APP_PLATFORM := android-21
APP_STL := c++_shared
APP_ABI := armeabi-v7a arm64-v8a x86 x86_64
APP_OPTIM := release
APP_CPPFLAGS += -std=c++17 -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON
APP_USE_CPP0X := true
APP_CPPFLAGS += -std=c++17 -DUSE_PTHREADS -DNDEBUG -O3

ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
APP_CPPFLAGS += -m32 -DUSE_SSE -DUSE_PREFETCH -DUSE_POPCNT
endif

ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
APP_CPPFLAGS += -m64 -DIS_64BIT -DUSE_PREFETCH -DUSE_POPCNT -DUSE_NEON=8
endif

ifeq ($(TARGET_ARCH_ABI),x86)
APP_CPPFLAGS += -m32 -DNO_PREFETCH -DUSE_SSE3 -DUSE_POPCNT -DUSE_MMX
endif

ifeq ($(TARGET_ARCH_ABI),x86_64)
APP_CPPFLAGS += -m64 -DIS_64BIT -DUSE_PREFETCH -DUSE_SSE2 -DUSE_SSE3 -DUSE_POPCNT
endif