2023-09-11 06:21:20 +00:00
|
|
|
@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
|
|
|
|
|
2023-09-11 06:21:20 +00:00
|
|
|
set wasmFlags=--target=wasm32^
|
|
|
|
--no-standard-libraries ^
|
2023-09-16 17:57:07 +00:00
|
|
|
-mbulk-memory ^
|
|
|
|
-g -O2 ^
|
|
|
|
-D__ORCA__ ^
|
2023-09-11 06:21:20 +00:00
|
|
|
-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
|
2023-09-11 06:21:20 +00:00
|
|
|
|
|
|
|
clang %wasmFlags% -o .\liborca.a ..\..\src\orca.c ..\..\src\libc-shim\src\*.c
|
|
|
|
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
|
|
|
|
|
|
|
zig build bundle
|