onnxruntime
d6dcef19 - [js/rn] Add 16KB page size alignment for Android (#27523)

Commit
77 days ago
[js/rn] Add 16KB page size alignment for Android (#27523) ### Description Added the `-Wl,-z,max-page-size=16384` linker flag to the `onnxruntimejsi` target in `js/react_native/android/CMakeLists.txt` to support **16KB memory page sizes**. ### **Motivation and Context** Starting with **Android 15**, Google Play requires apps to be compatible with 16KB page size devices. By default, the Android NDK builds shared libraries with 4KB ELF segment alignment. Without this explicit flag, `libonnxruntimejsi.so` fails the Play Store's 16KB alignment check, leading to potential crashes or installation failures on supported hardware. ### **Changes** - Updated `js/react_native/android/CMakeLists.txt`. - Applied `target_link_options` to `onnxruntimejsi` to enforce `max-page-size=16384` (16KB). ### **References** - [[Android Developer Guide: Support 16 KB page sizes](https://developer.android.com/guide/practices/page-sizes#fix-cmake)](https://developer.android.com/guide/practices/page-sizes#fix-cmake) @fs-eire
Author
Parents
Loading