22 lines
570 B
Bash
Executable File
22 lines
570 B
Bash
Executable File
#!/bin/bash
|
|
# Phase 2: build the native DValue/UCEB1 core subset plus one statically
|
|
# linked real .uce page as a WASM reactor. Runs on k-uce; artifacts go under
|
|
# /tmp/uce/wasm-phase2.
|
|
set -e
|
|
cd "$(dirname "$0")"
|
|
|
|
SDK=/opt/wasi-sdk
|
|
OUT=/tmp/uce/wasm-phase2
|
|
mkdir -p "$OUT"
|
|
|
|
"$SDK/bin/clang++" --target=wasm32-wasip1 -mexec-model=reactor \
|
|
-O1 -fno-exceptions \
|
|
-I../.. -I../../src/lib \
|
|
core.cpp -o "$OUT/core.wasm" \
|
|
-Wl,--export-all \
|
|
-Wl,--export=__heap_base \
|
|
-Wl,--allow-undefined-file=hostcalls.syms
|
|
|
|
echo "--- phase2 core.wasm ---"
|
|
ls -la "$OUT/core.wasm"
|