windows: cleanup after bootstrapping with unicode entrypoint

This commit is contained in:
vitalyster 2019-12-27 21:07:31 +03:00 committed by Alexander Medvednikov
parent 796c376408
commit 2f23ee4818
3 changed files with 4 additions and 33 deletions

View file

@ -28,18 +28,14 @@ if not exist "%gccpath%" (
goto:msvcstrap
)
gcc -std=c99 -DV_BOOTSTRAP -w -o v2.exe vc\v_win.c
gcc -std=c99 -municode -w -o v2.exe vc\v_win.c
if %ERRORLEVEL% NEQ 0 (
echo gcc failed to compile - Create an issue at 'https://github.com/vlang'
exit /b 1
)
echo Now using V to build V...
rem TODO: remove when v.c is updated
set VFLAGS=-cflags -DV_BOOTSTRAP -o v3.c v.v
v2.exe
gcc -std=c99 -DV_BOOTSTRAP -w -o v3.exe vc\v_win.c
set VFLAGS=
v2.exe -o v3.exe v.v
v3.exe -o v.exe -prod v.v
if %ERRORLEVEL% NEQ 0 (
echo v.exe failed to compile itself - Create an issue at 'https://github.com/vlang'
@ -81,11 +77,7 @@ if %ERRORLEVEL% NEQ 0 (
)
echo rebuild from source (twice, in case of C definitions changes)
rem TODO: remove when v.c is updated
set VFLAGS=-cc msvc -cflags /DV_BOOTSTRAP -o v3.c v.v
v2.exe
cl.exe /nologo /w /volatile:ms /Fo%ObjFile% /O2 /MD /D_VBOOTSTRAP v3.c user32.lib kernel32.lib advapi32.lib shell32.lib /link /NOLOGO /OUT:v3.exe /INCREMENTAL:NO
set VFLAGS=
v2.exe -cc msvc -o v3.exe v.v
v3.exe -cc msvc -o v -prod v.v
if %ERRORLEVEL% NEQ 0 (
echo V failed to build itself with error %ERRORLEVEL%