[js/rn] Add 16KB page size alignment for Android#27523
[js/rn] Add 16KB page size alignment for Android#27523fs-eire merged 3 commits intomicrosoft:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the React Native Android CMake build for the onnxruntimejsi shared library to ensure it passes Android 15 / Google Play requirements for 16KB memory page size devices by enforcing 16KB ELF segment alignment at link time.
Changes:
- Add
-Wl,-z,max-page-size=16384to theonnxruntimejsitarget link options to support 16KB page sizes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
/azp run Linux QNN CI Pipeline, Win_TRT_Minimal_CUDA_Test_CI, Windows ARM64 QNN CI Pipeline, Windows GPU Doc Gen CI Pipeline |
|
Azure Pipelines successfully started running 4 pipeline(s). |
|
Please merge/rebase to latest main branch which fixes the Windows CPU CI pipeline failure. |
|
@fs-eire |
|
/azp run Linux QNN CI Pipeline, Win_TRT_Minimal_CUDA_Test_CI, Windows ARM64 QNN CI Pipeline, Windows GPU Doc Gen CI Pipeline |
|
Azure Pipelines successfully started running 4 pipeline(s). |
Description
Added the
-Wl,-z,max-page-size=16384linker flag to theonnxruntimejsitarget injs/react_native/android/CMakeLists.txtto 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.sofails the Play Store's 16KB alignment check, leading to potential crashes or installation failures on supported hardware.Changes
js/react_native/android/CMakeLists.txt.target_link_optionstoonnxruntimejsito enforcemax-page-size=16384(16KB).References
@fs-eire