gogio: [Android] support 16kB page sizes, required for Android 15+

Previously, Gio crashes on 16KB page-size enable version of
Android 15. Also, Google Play will require 16KB compatible
apps by November 2025.

This patch changes the page-size of C/CGO to 64KB, which is
compatible with 4KB, 16KB and 64KB. That is also the same
value used by Golang Compiler itself.

Signed-off-by: inkeliz <inkeliz@inkeliz.com>
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
inkeliz
2025-05-27 04:17:42 +01:00
committed by Elias Naur
parent 3f0ad89ca9
commit aecb4723c9
+1 -1
View File
@@ -217,7 +217,7 @@ func compileAndroid(tmpDir string, tools *androidTools, bi *buildInfo) (err erro
cmd := exec.Command(
"go",
"build",
"-ldflags=-w -s "+bi.ldflags,
"-ldflags=-w -s -extldflags \"-Wl,-z,max-page-size=65536\" "+bi.ldflags,
"-buildmode=c-shared",
"-tags", bi.tags,
"-o", libFile,