diff options
author | Steve Dower <steve.dower@python.org> | 2020-11-18 17:24:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-18 17:24:36 (GMT) |
commit | 2156d964a12285280c533af1c96eb273c58451e6 (patch) | |
tree | 9481f5ca37da936f0759783843df58891768b66f /PCbuild/prepare_libffi.bat | |
parent | 07f2adedf0940b06d136208ec386d69b7d2d5b43 (diff) | |
download | cpython-2156d964a12285280c533af1c96eb273c58451e6.zip cpython-2156d964a12285280c533af1c96eb273c58451e6.tar.gz cpython-2156d964a12285280c533af1c96eb273c58451e6.tar.bz2 |
bpo-42336: Improve PCbuild batch files (GH-23275)
Diffstat (limited to 'PCbuild/prepare_libffi.bat')
-rw-r--r-- | PCbuild/prepare_libffi.bat | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/PCbuild/prepare_libffi.bat b/PCbuild/prepare_libffi.bat index f41ba83..922a475 100644 --- a/PCbuild/prepare_libffi.bat +++ b/PCbuild/prepare_libffi.bat @@ -22,10 +22,10 @@ echo Based on https://github.com/libffi/libffi/blob/master/.appveyor.yml echo. echo. echo.Available flags: -echo. -x64 build for x64 -echo. -x86 build for x86 -echo. -arm32 build for arm32 -echo. -arm64 build for arm64 +echo. -x64 enable x64 build +echo. -x86 enable x86 build +echo. -arm32 enable arm32 build +echo. -arm64 enable arm64 build echo. -? this help echo. --install-cygwin install cygwin to c:\cygwin exit /b 127 @@ -44,6 +44,7 @@ set INSTALL_CYGWIN= if "%1"=="" goto :CheckOptsDone if /I "%1"=="-x64" (set BUILD_X64=1) & shift & goto :CheckOpts if /I "%1"=="-x86" (set BUILD_X86=1) & shift & goto :CheckOpts +if /I "%1"=="-win32" (set BUILD_X86=1) & shift & goto :CheckOpts if /I "%1"=="-arm32" (set BUILD_ARM32=1) & shift & goto :CheckOpts if /I "%1"=="-arm64" (set BUILD_ARM64=1) & shift & goto :CheckOpts if /I "%1"=="-pdb" (set BUILD_PDB=-g) & shift & goto :CheckOpts @@ -67,9 +68,7 @@ setlocal if NOT DEFINED SH if exist c:\cygwin\bin\sh.exe set SH=c:\cygwin\bin\sh.exe if NOT DEFINED VCVARSALL ( - if exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ( - set VCVARSALL="C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" - ) + for /F "tokens=*" %%i in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -property installationPath -latest -prerelease -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64') DO @(set VCVARSALL="%%i\VC\Auxiliary\Build\vcvarsall.bat") ) if ^%VCVARSALL:~0,1% NEQ ^" SET VCVARSALL="%VCVARSALL%" |