CMake
In plain words
If you use CMake, update CMakeLists.txt with linker options setting max-page-size and common-page-size to 16384 to enable 16 KB ELF alignment.
- Add target_link_options with "-Wl,-z,max-page-size=16384" and "-Wl,-z,common-page-size=16384" for your project target.
- Even if you dynamically link libc++_shared.so from NDK r26 or lower (some lack 16 KB alignment), you should still align all other libraries and avoid depending on PAGE_SIZE in code.
- To test on 16 KB devices with lower NDK versions, canary releases of LTS NDK r23 and r25 with 16 KB aligned libc++_shared.so are available on Android CI.
- If you can't move to a newer NDK, you might be able to statically compile the C++ standard library into your shared library; read the linked Important Considerations.
From the official text
If you're using CMake, update your CMakeLists.txt to enable 16 KB ELF alignment: targetlinkoptions(${CMAKEPROJECTNAME} PRIVATE "-Wl,-z,max-page-size=16384" "-Wl,-z,common-page-size=16384" ) Note: Even if your app dynamically links to the C++ standard library (libc++shared.so) from NDKs r26 and lower, some of which …
Read the full official text ↗ Open in the StoreRules library Ask whether your app complies
Change history
No substantive change since StoreRules began tracking it.
Developers' cases about this clause
No cases yet.