Android: link every target with 16 KB-aligned ELF segments
ci / test (push) Canceled after 0s
ci / wasm (push) Canceled after 0s
ci / deny (push) Canceled after 0s
ci / fuzz (push) Canceled after 0s

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:
2026-10-19 23:15:30 +09:00
co-authored by Claude Opus 5.5
parent 1e073e1f09
commit 460580bcc8
+12
View File
@@ -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"]