flowrs-engine/tools/qemu-mips-wasm/fixtures/toggle/build.sh
flowRS 49c9d04fbc flowRS engine, cut from flowRS bd343e051a2e
Built alone from an empty CARGO_HOME, its tests passed, and flowrsc checked, ran and exported a
document from the conformance corpus; the export built alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-05 13:37:09 -05:00

10 lines
463 B
Shell
Executable file

#!/bin/bash
# The toggle demo, with LLVM (no GCC, no library). build.sh <out dir>
set -euo pipefail
D=$(cd "$(dirname "$0")" && pwd)
O=${1:-$D/out}
mkdir -p "$O"
/opt/homebrew/opt/llvm/bin/clang --target=mipsel-none-elf -march=mips32r2 -mabi=32 \
-mno-abicalls -fno-pic -c "$D/toggle.S" -o "$O/toggle.o"
/opt/homebrew/bin/ld.lld -T "$D/link.ld" -nostdlib --no-pie -z max-page-size=16 "$O/toggle.o" -o "$O/pic32-toggle.elf"
shasum -a 256 "$O/pic32-toggle.elf"