Skip to content

Commit 85a819e

Browse files
troZeePiotr Trocki
andauthored
feat(android): add 16kb support (#4)
* feat(android): add 16kb support * Revert "feat(android): add 16kb support" This reverts commit a4b9f4c. * feat(android): add 16kb support --------- Co-authored-by: Piotr Trocki <piotr@trocki.com>
1 parent e6f857c commit 85a819e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

android/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,7 @@ target_link_libraries(
6464
ReactAndroid::jsi
6565
)
6666

67+
# Enable Android 16kb native library alignment
68+
if(CMAKE_ANDROID_NDK_VERSION VERSION_LESS "27")
69+
target_link_options(${PACKAGE_NAME} PRIVATE "-Wl,-z,max-page-size=16384")
70+
endif()

android/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ android {
6868
cmake {
6969
cppFlags "-O2 -frtti -fexceptions -Wall -Wno-unused-variable -fstack-protector-all"
7070
arguments "-DANDROID_STL=c++_shared",
71-
"-DREACT_NATIVE_DIR=${REACT_NATIVE_DIR}"
71+
"-DREACT_NATIVE_DIR=${REACT_NATIVE_DIR}",
72+
"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
7273
abiFilters(*reactNativeArchitectures())
7374
}
7475
}

0 commit comments

Comments
 (0)