mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
make.bat: add `-local flag
This commit is contained in:
parent
6081e0d602
commit
2230cbae01
11
make.bat
11
make.bat
@ -4,6 +4,9 @@ echo Building V
|
|||||||
|
|
||||||
pushd %~dp0
|
pushd %~dp0
|
||||||
|
|
||||||
|
if "%~1"=="-local" goto :compile
|
||||||
|
if "%~2"=="-local" goto :compile
|
||||||
|
|
||||||
if exist "vc" (
|
if exist "vc" (
|
||||||
echo Updating vc...
|
echo Updating vc...
|
||||||
cd vc
|
cd vc
|
||||||
@ -14,10 +17,12 @@ if exist "vc" (
|
|||||||
git clone --depth 1 --quiet https://github.com/vlang/vc
|
git clone --depth 1 --quiet https://github.com/vlang/vc
|
||||||
)
|
)
|
||||||
|
|
||||||
|
:compile
|
||||||
REM option to force msvc or gcc
|
REM option to force msvc or gcc
|
||||||
if "%~1"=="-gcc" goto :gcc_strap
|
if "%~1"=="-gcc" goto :gcc_strap
|
||||||
|
if "%~2"=="-gcc" goto :gcc_strap
|
||||||
if "%~1"=="-msvc" goto :msvc_strap
|
if "%~1"=="-msvc" goto :msvc_strap
|
||||||
|
if "%~2"=="-msvc" goto :msvc_strap
|
||||||
|
|
||||||
:gcc_strap
|
:gcc_strap
|
||||||
echo Attempting to build v.c with GCC...
|
echo Attempting to build v.c with GCC...
|
||||||
@ -37,8 +42,6 @@ if %ERRORLEVEL% NEQ 0 (
|
|||||||
goto :error
|
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
|
v.exe self
|
||||||
if %ERRORLEVEL% NEQ 0 (
|
if %ERRORLEVEL% NEQ 0 (
|
||||||
echo v.exe failed to compile itself - Create an issue at 'https://github.com/vlang'
|
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
|
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
|
v.exe -cc msvc self
|
||||||
if %ERRORLEVEL% NEQ 0 (
|
if %ERRORLEVEL% NEQ 0 (
|
||||||
echo V failed to build itself with error %ERRORLEVEL%
|
echo V failed to build itself with error %ERRORLEVEL%
|
||||||
|
Loading…
Reference in New Issue
Block a user