From 9c80f79110f4995000ca4e14ba4a92402e63c728 Mon Sep 17 00:00:00 2001 From: Waozi Date: Mon, 16 Nov 2026 04:10:17 -0300 Subject: [PATCH] Build Android runtimes with the host zi2c build_android_runtime.py ran Ziran's make with the NDK compiler and no GEN_ZI2C, so the generated-C step would run a zi2c built for the device. It now passes the pinned toolchain's build/bin/zi2c, which the Android CMake already requires. The ZX player APK builds for all three ABIs and runs app.zx natively on the Moto (armeabi-v7a). --- CHANGELOG.md | 4 ++++ scripts/build_android_runtime.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3feba4037..f1d2afe09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +- Android builds compile Ziran's runtime for each ABI with the pinned + toolchain's own `zi2c` (`GEN_ZI2C`), so the modules Ziran generates C for + build on the host instead of with a `zi2c` built for the device; the ZX + player APK builds again and runs `app.zx` natively on the ARMv7 Moto. - Kryon's renderer and SDL3 artifacts no longer list the top-level `Makefile` as a recipe input. Their providers never read it, and Ziran refuses an artifact whose inputs change while it builds, so an edit there failed a diff --git a/scripts/build_android_runtime.py b/scripts/build_android_runtime.py index 05c84c7ab..bf878d9d2 100644 --- a/scripts/build_android_runtime.py +++ b/scripts/build_android_runtime.py @@ -25,6 +25,9 @@ command = [ "CC=" + a.cc, "AR=" + a.ar, "OBJCOPY=" + a.objcopy, + # The modules Ziran generates C for compile on this host, with the + # pinned toolchain's own zi2c, not one built for the device. + "GEN_ZI2C=" + str(source / "build/bin/zi2c"), "CFLAGS=" + a.flags, "FRAMEFLAGS=-Wframe-larger-than=16384", str(output / "libziran.a"),