From 2230cbae0179e2d5920283e8de1b2bcae21a74b3 Mon Sep 17 00:00:00 2001 From: yuyi Date: Thu, 4 Jun 2020 20:07:02 +0800 Subject: [PATCH] make.bat: add `-local flag --- make.bat | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/make.bat b/make.bat index 6522139c75..0a903f916a 100644 --- a/make.bat +++ b/make.bat @@ -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%