make.bat: add default msvc2015 config when there is no vswhere.exe

pull/4752/head
yuyi 2020-05-06 18:05:52 +08:00 committed by GitHub
parent 51f3f31a4e
commit 61e00e6796
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -61,6 +61,8 @@ for /f "usebackq tokens=*" %%i in (`"%VsWhereDir%\Microsoft Visual Studio\Instal
if exist "%InstallDir%\Common7\Tools\vsdevcmd.bat" ( if exist "%InstallDir%\Common7\Tools\vsdevcmd.bat" (
call "%InstallDir%\Common7\Tools\vsdevcmd.bat" -arch=%HostArch% -host_arch=%HostArch% -no_logo call "%InstallDir%\Common7\Tools\vsdevcmd.bat" -arch=%HostArch% -host_arch=%HostArch% -no_logo
) else if exist "%VsWhereDir%\Microsoft Visual Studio 14.0\Common7\Tools\vsdevcmd.bat" (
call "%VsWhereDir%\Microsoft Visual Studio 14.0\Common7\Tools\vsdevcmd.bat" -arch=%HostArch% -host_arch=%HostArch% -no_logo
) else ( ) else (
goto :no_compiler goto :no_compiler
) )
@ -80,7 +82,6 @@ if %ERRORLEVEL% NEQ 0 (
echo V failed to build itself with error %ERRORLEVEL% echo V failed to build itself with error %ERRORLEVEL%
rd /s /q vc rd /s /q vc
del v_old.exe del v_old.exe
del v2.pdb
del vc140.pdb del vc140.pdb
del %ObjFile% del %ObjFile%
goto :compile_error goto :compile_error
@ -88,7 +89,6 @@ if %ERRORLEVEL% NEQ 0 (
rd /s /q vc rd /s /q vc
del v_old.exe del v_old.exe
del v2.pdb
del vc140.pdb del vc140.pdb
del %ObjFile% del %ObjFile%