-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.bat
46 lines (35 loc) · 1.23 KB
/
build.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
@echo off
if [%LITAC_HOME%] == [] goto error_exit
del ".\bin\litacc.*" /q
del ".\bin\litac.*" /q
REM set BUILD_CMD="clang.exe -std=c99 -g -gcodeview -fsanitize=undefined,address %%input%% -o %%output%% -D_CRT_SECURE_NO_WARNINGS"
set BUILD_CMD="clang.exe -std=c99 %%input%% -o %%output%% -D_CRT_SECURE_NO_WARNINGS"
echo Running bootstrapped litaC...
cp "bootstrap\litacc.exe" "bin\litacc.exe"
cd bin
litacc.exe -version
litacc.exe -disableLine -cFormat -profile -buildCmd %BUILD_CMD% "../src/main.lita" -outputDir "./" -output "litac" -maxMemory 1GiB
if errorlevel 1 (
goto error_compiling
)
echo Running litaC inception!...
litac.exe -disableLine -verbose -profile -cFormat -debug -buildCmd %BUILD_CMD% "../src/main.lita" -maxMemory 1GiB
if errorlevel 1 (
goto error_compiling
)
goto end
:error_compiling
echo.
echo ==========================================
echo ERROR: Compiling litac compiler
echo ==========================================
echo.
goto end
:error_exit
echo.
echo ==========================================
echo ERROR: It appears you do not have the 'LITAC_HOME' system variable defined. Please make sure this is set to the home directory of litac
echo ==========================================
echo.
:end
echo Completed.