make.bat: add `-local flag

pull/5209/head
yuyi 2020-06-04 20:07:02 +08:00 committed by GitHub
parent 6081e0d602
commit 2230cbae01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 5 deletions

View File

@ -4,6 +4,9 @@ echo Building V
pushd %~dp0
if "%~1"=="-local" goto :compile
if "%~2"=="-local" goto :compile
if exist "vc" (
echo Updating vc...
cd vc
@ -14,10 +17,12 @@ if exist "vc" (
git clone --depth 1 --quiet https://github.com/vlang/vc
)
:compile
REM option to force msvc or gcc
if "%~1"=="-gcc" goto :gcc_strap
if "%~2"=="-gcc" goto :gcc_strap
if "%~1"=="-msvc" goto :msvc_strap
if "%~2"=="-msvc" goto :msvc_strap
:gcc_strap
echo Attempting to build v.c with GCC...
@ -37,8 +42,6 @@ if %ERRORLEVEL% NEQ 0 (
goto :error
)
REM remove the -prod parameter to shorten compilation time,
REM and it will be restored when v is a stable version.
v.exe self
if %ERRORLEVEL% NEQ 0 (
echo v.exe failed to compile itself - Create an issue at 'https://github.com/vlang'
@ -77,8 +80,6 @@ if %ERRORLEVEL% NEQ 0 (
goto :compile_error
)
REM remove the -prod parameter to shorten compilation time,
REM and it will be restored when v is a stable version.
v.exe -cc msvc self
if %ERRORLEVEL% NEQ 0 (
echo V failed to build itself with error %ERRORLEVEL%