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

Support for armv8 arch only devices #994

Merged
merged 4 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion hello-neon/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ android {
targetSdkVersion 33
versionCode 1
versionName "1.0"
ndk.abiFilters 'x86', 'x86_64', 'armeabi-v7a'
ndk.abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
}
buildTypes {
release {
Expand Down
3 changes: 2 additions & 1 deletion hello-neon/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ elseif (${ANDROID_ABI} STREQUAL "x86")
-Wno-static-in-inline")
add_definitions(-DHAVE_NEON_X86=1 -DHAVE_NEON=1)
else ()
set(neon_SRCS)
set(neon_SRCS helloneon-intrinsics.c)
add_definitions("-DHAVE_NEON=1")
endif ()

add_library(hello-neon SHARED helloneon.c ${neon_SRCS})
Expand Down
2 changes: 1 addition & 1 deletion hello-neon/app/src/main/cpp/helloneon.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jstring Java_com_example_helloneon_HelloNeon_stringFromJNI(JNIEnv* env,
strlcat(buffer, "Neon version : ", sizeof buffer);

family = android_getCpuFamily();
if ((family != ANDROID_CPU_FAMILY_ARM) &&
if ((family != ANDROID_CPU_FAMILY_ARM) && (family!=ANDROID_CPU_FAMILY_ARM64) &&
DanAlbert marked this conversation as resolved.
Show resolved Hide resolved
(family != ANDROID_CPU_FAMILY_X86)) {
strlcat(buffer, "Not an ARM and not an X86 CPU !\n", sizeof buffer);
goto EXIT;
Expand Down