Skip to content

Added x86_64 architecture #1448

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

Merged
merged 1 commit into from
Aug 20, 2019
Merged
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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
6.0.2
==

## What's New

- [Include x86_64 architecture](https://github.com/NativeScript/android-runtime/issues/1419)

6.0.1
==

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tns-android",
"description": "NativeScript Runtime for Android",
"version": "6.0.1",
"version": "6.0.2",
"repository": {
"type": "git",
"url": "https://github.com/NativeScript/android-runtime.git"
Expand Down
2 changes: 1 addition & 1 deletion test-app/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ android {
if (onlyX86) {
abiFilters 'x86'
} else {
abiFilters 'x86', 'armeabi-v7a', 'arm64-v8a'
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
}
}
dexOptions {
Expand Down
Binary file modified test-app/app/src/main/assets/app/modules/libCalc-arm.so
Binary file not shown.
Binary file modified test-app/app/src/main/assets/app/modules/libCalc-arm64.so
Binary file not shown.
Binary file modified test-app/app/src/main/assets/app/modules/libCalc-x86.so
Binary file not shown.
Binary file not shown.
4 changes: 3 additions & 1 deletion test-app/app/src/main/assets/app/tests/testNativeModules.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ describe("Tests native modules)", function () {
if (lcArch.indexOf("arm") > -1) {
arch = "arm";
} else if (lcArch.indexOf("aarch64") > -1) {
arch = (com.tns.Runtime.getPointerSize() == 4) ? "arm" : "arm64";
arch = (com.tns.Runtime.getPointerSize() == 4) ? "arm" : "arm64";
} else if (lcArch.indexOf("i686") > -1) {
arch = "x86";
} else if (lcArch.indexOf("x86_64") > -1) {
arch = "x86_64";
} else {
throw new Error("Unsupported architecture=" + sysArch);
}
Expand Down
3 changes: 2 additions & 1 deletion test-app/runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,10 @@ MESSAGE(STATUS "# CMAKE_CXX_FLAGS: " ${CMAKE_CXX_FLAGS})
target_link_libraries(NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libzip.a)
target_link_libraries(NativeScript ${PROJECT_SOURCE_DIR}/src/main/libs/${ANDROID_ABI}/libv8.a)

if("${ANDROID_ABI}" MATCHES "armeabi-v7a" OR "${ANDROID_ABI}" MATCHES "x86")
if("${ANDROID_ABI}" MATCHES "armeabi-v7a$" OR "${ANDROID_ABI}" MATCHES "x86$")
# On API Level 19 and lower we need to link with android_support
# because it contains some implementation of functions such as "strtoll" and "strtoul"
MESSAGE(STATUS "# Linking with libandroid_support.a")
target_link_libraries(NativeScript ${ANDROID_NDK_ROOT}/sources/cxx-stl/llvm-libc++/libs/${ANDROID_ABI}/libandroid_support.a)
endif()

Expand Down
2 changes: 1 addition & 1 deletion test-app/runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ android {
if (onlyX86) {
abiFilters 'x86'
} else {
abiFilters 'x86', 'armeabi-v7a', 'arm64-v8a'
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
}
}
}
Expand Down
Binary file modified test-app/runtime/src/main/libs/arm64-v8a/libzip.a
Binary file not shown.
Binary file modified test-app/runtime/src/main/libs/armeabi-v7a/libzip.a
Binary file not shown.
Binary file modified test-app/runtime/src/main/libs/x86/libzip.a
Binary file not shown.
253 changes: 253 additions & 0 deletions test-app/runtime/src/main/libs/x86_64/include/natives_blob.h

Large diffs are not rendered by default.

19,555 changes: 19,555 additions & 0 deletions test-app/runtime/src/main/libs/x86_64/include/snapshot_blob.h

Large diffs are not rendered by default.

Binary file added test-app/runtime/src/main/libs/x86_64/libv8.a
Binary file not shown.
Binary file added test-app/runtime/src/main/libs/x86_64/libzip.a
Binary file not shown.