Skip to content

Commit cc0278f

Browse files
fix(🤖): Add flag to build librnskia.so for 16 KB page sizes to android CMakeLists.txt (#3177)
--------- Co-authored-by: William Candillon <[email protected]>
1 parent bde4417 commit cc0278f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

‎packages/skia/android/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,3 +335,8 @@ else()
335335
-lEGL
336336
)
337337
endif()
338+
339+
# Enable Android 16kb native library alignment
340+
if(CMAKE_ANDROID_NDK_VERSION VERSION_LESS "27")
341+
target_link_options(${PACKAGE_NAME} PRIVATE "-Wl,-z,max-page-size=16384")
342+
endif()

‎packages/skia/android/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ android {
156156
arguments '-DANDROID_STL=c++_shared',
157157
"-DREACT_NATIVE_VERSION=${REACT_NATIVE_VERSION}",
158158
"-DNODE_MODULES_DIR=${nodeModules}",
159-
"-DPREBUILT_DIR=${prebuiltDir}"
159+
"-DPREBUILT_DIR=${prebuiltDir}",
160+
"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
160161

161162
}
162163
}

0 commit comments

Comments
 (0)