#!/usr/bin/env bash # Host build + smoke test. CI entry point; not used by Flutter itself. set -euo pipefail cd "$(dirname "$0")/.." command -v v >/dev/null || { echo "V compiler not on PATH"; exit 1; } mkdir -p build # -gc none matches what the Flutter builds use (src/CMakeLists.txt), so the # ownership rules exercised here are the real ones. -prod turns on the C # optimiser; without it the numeric kernels are several times slower. v -shared -gc none -prod -o build/libvflutter.so src/vflutter.v echo "built: $(ls -la build/libvflutter.so | awk '{print $5}') bytes" nm -D --defined-only build/libvflutter.so | grep ' vf_' || { echo "no vf_ exports!"; exit 1; }