orca/samples/zig-sample/build.bat

36 lines
893 B
Batchfile
Raw Normal View History

@echo off
:: compile wasm module
2023-09-16 17:57:07 +00:00
rem set wasmFlags=--target=wasm32^
rem --no-standard-libraries ^
rem -fno-builtin ^
rem -Wl,--no-entry ^
rem -Wl,--export-dynamic ^
rem -Wl,--relocatable ^
rem -g ^
rem -O2 ^
rem -mbulk-memory ^
rem -D__ORCA__ ^
rem -isystem ..\..\src\libc-shim\include ^
rem -I..\..\ext -I ..\..\src
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