Ziran dropped the semantic bundle VM: every bundle is revision-28 executable ZX on the instruction engine (or its Wasm tier). Players and hosted apps call InstantiateBundle on every target, including the browser; the --vm option of the zx player goes, and its tests run without it. The web, Raylib and Android runtimes build libziran in normal mode so they carry the engine (BOOTSTRAP=1 builds have none), and their rebuild rules watch the engine's Ziran sources.
33 lines
911 B
Python
33 lines
911 B
Python
#!/usr/bin/env python3
|
|
"""Build the pinned Ziran host runtime (libziran.a) for an Android target."""
|
|
|
|
import argparse
|
|
import os
|
|
from pathlib import Path
|
|
import subprocess
|
|
|
|
p = argparse.ArgumentParser()
|
|
p.add_argument("--source", type=Path, required=True)
|
|
p.add_argument("--output", type=Path, required=True)
|
|
p.add_argument("--cc", required=True)
|
|
p.add_argument("--ar", default="ar")
|
|
p.add_argument("--objcopy", default="objcopy")
|
|
p.add_argument("--flags", default="-O2 -fPIC")
|
|
a = p.parse_args()
|
|
source = a.source.resolve()
|
|
output = a.output.resolve()
|
|
command = [
|
|
"/usr/bin/make" if os.environ.get("HARMONY_BUILD_OWNER") else "make",
|
|
"-j4",
|
|
"-C",
|
|
str(source),
|
|
"BUILD_DIR=" + str(output),
|
|
"CC=" + a.cc,
|
|
"AR=" + a.ar,
|
|
"OBJCOPY=" + a.objcopy,
|
|
"CFLAGS=" + a.flags,
|
|
"FRAMEFLAGS=-Wframe-larger-than=16384",
|
|
str(output / "libziran.a"),
|
|
]
|
|
subprocess.run(command, check=True)
|