mirror of
https://github.com/zer0condition/GoodmansKernel/
synced 2026-08-19 01:14:35 +00:00
23 lines
525 B
Batchfile
23 lines
525 B
Batchfile
@echo off
|
|
setlocal
|
|
cd /d "%~dp0"
|
|
set CLANG=%LLVM_HOME%\bin\clang.exe
|
|
if not exist "%CLANG%" set CLANG=C:\Program Files\LLVM\bin\clang.exe
|
|
if not exist "%CLANG%" (
|
|
echo [X] clang not found. install LLVM or set LLVM_HOME.
|
|
exit /b 1
|
|
)
|
|
|
|
set CFLAGS=-O2 --target=wasm32 -nostdlib -fno-builtin -I..\guest_sdk
|
|
set LFLAGS=-Wl,--no-entry -Wl,--export-dynamic -Wl,--allow-undefined -Wl,--strip-all
|
|
|
|
call :one toolkit
|
|
call :one process_tracer
|
|
|
|
exit /b 0
|
|
|
|
:one
|
|
echo [*] %~1
|
|
"%CLANG%" %CFLAGS% %LFLAGS% -o %~1.wasm %~1.c
|
|
exit /b 0
|