Android: link every target with 16 KB-aligned ELF segments
Google Play requires 16 KB page-size support for apps targeting Android 15+. The 64-bit builds happened to be 16 KB-aligned by toolchain default, but armeabi-v7a was 4 KB. Pin -z max-page-size=16384 for all Android targets. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
# Android 15+ devices can run with 16 KB memory pages, and Google Play requires native libraries to support
|
||||
# them. Link every Android build of the core with 16 KB-aligned ELF segments explicitly, instead of relying on
|
||||
# the NDK/rustc defaults (NDK r27 still defaults to 4 KB for some toolchains). Harmless on 4 KB-page devices.
|
||||
# Verified by kestrove-android/scripts/check-16kb.sh.
|
||||
[target.aarch64-linux-android]
|
||||
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384", "-C", "link-arg=-Wl,-z,common-page-size=16384"]
|
||||
|
||||
[target.x86_64-linux-android]
|
||||
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384", "-C", "link-arg=-Wl,-z,common-page-size=16384"]
|
||||
|
||||
[target.armv7-linux-androideabi]
|
||||
rustflags = ["-C", "link-arg=-Wl,-z,max-page-size=16384", "-C", "link-arg=-Wl,-z,common-page-size=16384"]
|
||||
Reference in New Issue
Block a user