You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

16 lines
337 B

#!/bin/bash
flags="--target=wasm32 \
--no-standard-libraries \
-fno-builtin \
-Wl,--no-entry \
-Wl,--export-all \
-Wl,--allow-undefined \
-I ./"
# generate header files for shaders
./shader2header.sh
# compile to wasm
CC=/usr/local/opt/llvm/bin/clang
$CC $flags -Isrc -o main.wasm src/main.c