Skip to content

Commit

Permalink
Update android build
Browse files Browse the repository at this point in the history
* update NDK version 27
* enable 16KB page size

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
  • Loading branch information
clover2123 committed Jul 30, 2024
1 parent 0f6ea46 commit 7540130
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion build/android/escargot/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ android {
externalNativeBuild {
cmake {
arguments "-DCMAKE_VERBOSE_MAKEFILE=ON", "-DESCARGOT_HOST=android", "-DESCARGOT_OUTPUT=static_lib", "-DENABLE_SHELL=OFF",
"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON",
"-DESCARGOT_BUILD_64BIT_FORCE_LARGE="+project.ext.force64Option
}
}
Expand Down Expand Up @@ -82,7 +83,7 @@ android {
}
}

ndkVersion '25.2.9519653'
ndkVersion '27.0.12077973'

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down
4 changes: 3 additions & 1 deletion build/android/escargot/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ else (UNDER_NDK)
INCLUDE_DIRECTORIES(${JNI_INCLUDE_DIRS})
endif ()

# enable 16KB page size (require version of Android NDK >= 27)
ADD_LINK_OPTIONS(-Wl,-z,max-page-size=16384)
TARGET_LINK_LIBRARIES (escargot-jni PRIVATE escargot ${LOG_LIBRARY})

if (ENABLE_SHELL)
Expand All @@ -53,4 +55,4 @@ if (ENABLE_SHELL)

ADD_EXECUTABLE(test-data-runner ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../tools/test/test-data-runner/test-data-runner.cpp)
TARGET_COMPILE_OPTIONS(test-data-runner PRIVATE -std=c++11)
endif ()
endif ()

0 comments on commit 7540130

Please sign in to comment.