Skip to content

Commit bac29f1

Browse files
committed
Add support for 16 KB page size in native library for Android 15+ compliance
1 parent 08bbbdf commit bac29f1

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

library/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ find_library(log-lib log)
1919

2020
target_link_libraries(sc-native-lib ${log-lib})
2121

22+
# 16 KB page size support for Android 15+ / Google Play (Nov 2025+)
23+
target_link_options(sc-native-lib PRIVATE "-Wl,-z,max-page-size=16384")
24+
2225
set_target_properties(sc-native-lib PROPERTIES
2326
CXX_STANDARD 17
2427
CXX_STANDARD_REQUIRED YES

library/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ android {
1818
externalNativeBuild {
1919
cmake {
2020
cppFlags += "-fexceptions"
21+
// 16 KB page size support (required for Android 15+ / Google Play from Nov 2025)
22+
arguments += listOf("-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON")
2123
}
2224
}
2325
}

0 commit comments

Comments
 (0)