Skip to content

Commit 52a31b6

Browse files
DickSmithpetekanev
authored andcommitted
Include ARM64 binaries (#952)
* Build arm64 runtime binaries
1 parent d78b2a3 commit 52a31b6

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

test-app/runtime/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,19 @@ cmake_minimum_required(VERSION 3.4.1)
88
# "-DANDROID_STL=c++_static" is just not enough for clang++ to find some libraries in the ndk
99
MESSAGE( STATUS "## ANDROID_NDK_ROOT: " ${ANDROID_NDK_ROOT} )
1010

11+
if ( ANDROID_ABI MATCHES "arm64" )
12+
set(ARCH_INCLUDE_DIR "aarch64-linux-android")
13+
else()
14+
set(ARCH_INCLUDE_DIR "arm-linux-androideabi")
15+
endif()
16+
1117
# Command info: https://cmake.org/cmake/help/v3.4/command/include_directories.html
1218
include_directories( src/main/cpp
1319
src/main/cpp/include
1420
src/main/cpp/v8_inspector
1521

1622
# hack to find some libraries from the ndk
17-
${ANDROID_NDK_ROOT}/sysroot/usr/include/arm-linux-androideabi/
23+
${ANDROID_NDK_ROOT}/sysroot/usr/include/${ARCH_INCLUDE_DIR}/
1824
)
1925
if ( OPTIMIZED_BUILD )
2026
set(CMAKE_CXX_FLAGS "-std=c++11 -fexceptions -fno-builtin-stpcpy -fno-rtti -O3 -fvisibility=hidden -ffunction-sections -fno-data-sections -Wl,--exclude-libs=ALL -Wl,--gc-sections")

test-app/runtime/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ android {
4646
}
4747

4848
ndk {
49-
abiFilters 'x86', 'armeabi-v7a'
49+
abiFilters 'x86', 'armeabi-v7a', "arm64-v8a"
5050
}
5151
}
5252

@@ -162,4 +162,4 @@ def createPackageConfigFileTask(taskName) {
162162
}
163163
}
164164
}
165-
}
165+
}

0 commit comments

Comments
 (0)