orca/samples/zig-sample/build.bat

23 lines
531 B
Batchfile
Raw Normal View History

@echo off
:: compile wasm module
2023-09-16 17:57:07 +00:00
set ORCA_DIR=..\..
set STDLIB_DIR=%ORCA_DIR%\src\libc-shim
set wasmFlags=--target=wasm32^
--no-standard-libraries ^
2023-09-16 17:57:07 +00:00
-mbulk-memory ^
-g -O2 ^
-D__ORCA__ ^
-Wl,--no-entry ^
-Wl,--export-dynamic ^
2023-09-12 03:50:05 +00:00
-Wl,--relocatable ^
2023-09-16 17:57:07 +00:00
-isystem %STDLIB_DIR%\include ^
-I%ORCA_DIR%\src ^
-I%ORCA_DIR%\src\ext
clang %wasmFlags% -o .\liborca.a ..\..\src\orca.c ..\..\src\libc-shim\src\*.c
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
zig build bundle