compile.sh 459 B

1234567891011121314
  1. #!/bin/sh
  2. # Copyright (C) 2019 Intel Corporation. All rights reserved.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. /opt/wasi-sdk/bin/clang \
  5. -O0 -z stack-size=4096 -Wl,--initial-memory=65536 \
  6. -Wl,--export=main -Wl,--export=__main_argc_argv \
  7. -Wl,--export=__data_end -Wl,--export=__heap_base \
  8. -Wl,--strip-all,--no-entry \
  9. -Wl,--allow-undefined \
  10. -Wl,--export=c_func\
  11. -Wl,--export=add\
  12. -o func.wasm func.c