Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/androidbuild/Apk.zig
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,19 @@ fn setLibCFile(apk: *Apk, compile: *Step.Compile) void {
fn updateArtifact(apk: *Apk, artifact: *Step.Compile, raw_top_level_apk_files: *Step.WriteFile) void {
const b = apk.b;

// Set page size to 16KB-aligned binaries by default
//
// For Android NDK r27 onwards, Android recommends the following setting by default
// Source: https://developer.android.com/guide/practices/page-sizes#compile-r27
//
// NOTE(jae): 2026-04-23
// Zig 0.16.0 stable does not do this by default and without this line, there is a pop-up
// warning when testing on Pixel 10, Android 17 VM device.
// Screenshot is on Github issue here: https://github.com/silbinarywolf/zig-android-sdk/issues/87
if (artifact.link_z_max_page_size == null) {
artifact.link_z_max_page_size = 16384;
}

// If you have a library that is being built as an *.so then install it
// alongside your library.
//
Expand Down
Loading