Skip to content

Commit 4890691

Browse files
author
Fernando Basello
committed
fix: support for 16kb page size for new android devices
Closes #5
1 parent c2c815c commit 4890691

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

android/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.8)
1+
cmake_minimum_required(VERSION 3.22.1)
22
project(HermesWorker)
33

44
set (CMAKE_VERBOSE_MAKEFILE ON)
@@ -46,6 +46,12 @@ target_include_directories(
4646
# build shared lib
4747
set_target_properties(${PACKAGE_NAME} PROPERTIES LINKER_LANGUAGE CXX)
4848

49+
# Ensure the shared object is linked with the 16 KB page alignment
50+
# required for new Android devices while keeping 4 KB compatibility.
51+
target_link_options(${PACKAGE_NAME} PRIVATE
52+
"-Wl,-z,common-page-size=4096"
53+
"-Wl,-z,max-page-size=16384")
54+
4955
target_link_libraries(
5056
${PACKAGE_NAME}
5157
log

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-hermes-worker",
3-
"version": "0.5.1",
3+
"version": "0.6.0",
44
"description": "A react-native js woker using hermes runtime",
55
"source": "./src/index.tsx",
66
"main": "./lib/commonjs/index.js",

0 commit comments

Comments
 (0)