Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
  • Loading branch information
Yisheng Jiang committed Jul 22, 2024
1 parent 7362759 commit c4ad79c
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions spin/Makfile-safe
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all: spin.wasm.js
all: spin.wasm.js pdta.wasm.js

clean: src/spin.c
rm -f build/*
Expand All @@ -23,15 +23,18 @@ spin.wasm.js: spin.wasm
# -Wl,--allow-undefined \
# -Wl,--export-all src/sp_run.c -o - |npx encode-wasm-uint8 > run.wasm.js

sprun:
pdta.wasm:
clang \
--target=wasm32 \
-emit-llvm -c -S \
-nostdlib \
-Wl,--no-entry \
-Wl,--export-all \
-Wl,--no-entry \
-Wl,--allow-undefined \
-Wl,--export-all \
src/sp_run.c \
-o sprun.js
-Wl,--allow-undefined \
-Wl,--lto-O3 -o build/pdta.wasm \
src/sf2.c

sprun.js: sprun.js \
cat sprun.sj | npx encode-wasm-uint8 > run.wasm.js

pdta.wasm.js: pdta.wasm
cat build/sf2.wasm | npx encode-wasm-uint8 > pdta.wasm.js

0 comments on commit c4ad79c

Please sign in to comment.