diff options
author | Anthony Shaw <anthony.p.shaw@gmail.com> | 2019-12-17 21:21:20 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@python.org> | 2019-12-17 21:21:20 (GMT) |
commit | 9e36589d49c1d6b06c0239fa69e8274d7e89e375 (patch) | |
tree | b18998717bc1cc78ad3521289f5528256b50542d /PCbuild/build.bat | |
parent | 9707e8e22d80ca97bf7a9812816701cecde6d226 (diff) | |
download | cpython-9e36589d49c1d6b06c0239fa69e8274d7e89e375.zip cpython-9e36589d49c1d6b06c0239fa69e8274d7e89e375.tar.gz cpython-9e36589d49c1d6b06c0239fa69e8274d7e89e375.tar.bz2 |
bpo-36500: Add --regen option to PCbuild/build.bat so Windows users can regen grammar, opcodes, tokens and symbols (GH-12654)
Diffstat (limited to 'PCbuild/build.bat')
-rw-r--r-- | PCbuild/build.bat | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/PCbuild/build.bat b/PCbuild/build.bat index 623409c..5bc5da9 100644 --- a/PCbuild/build.bat +++ b/PCbuild/build.bat @@ -32,6 +32,7 @@ echo. automatically by the pythoncore project) echo. --pgo Build with Profile-Guided Optimization. This flag echo. overrides -c and -d echo. --test-marker Enable the test marker within the build. +echo. --regen Regenerate all opcodes, grammar and tokens echo. echo.Available flags to avoid building certain modules. echo.These flags have no effect if '-e' is not given: @@ -76,7 +77,8 @@ if "%~1"=="-k" (set kill=true) & shift & goto CheckOpts if "%~1"=="--pgo" (set do_pgo=true) & shift & goto CheckOpts if "%~1"=="--pgo-job" (set do_pgo=true) & (set pgo_job=%~2) & shift & shift & goto CheckOpts if "%~1"=="--test-marker" (set UseTestMarker=true) & shift & goto CheckOpts -if "%~1"=="-V" shift & goto :Version +if "%~1"=="-V" shift & goto Version +if "%~1"=="--regen" (set Regen=true) & shift & goto CheckOpts rem These use the actual property names used by MSBuild. We could just let rem them in through the environment, but we specify them on the command line rem anyway for visibility so set defaults after this @@ -154,9 +156,22 @@ echo on /p:UseTestMarker=%UseTestMarker% %GITProperty%^ %1 %2 %3 %4 %5 %6 %7 %8 %9 +if "%Regen%"=="true" call :Regen @echo off exit /b %ERRORLEVEL% +:Regen +echo on +call "%dir%find_msbuild.bat" %MSBUILD% +if not ERRORLEVEL 1 %MSBUILD% "%dir%regen.vcxproj" /t:%target% %parallel% %verbose%^ + /p:IncludeExternals=%IncludeExternals%^ + /p:Configuration=%conf% /p:Platform=%platf%^ + /p:UseTestMarker=%UseTestMarker% %GITProperty%^ + %1 %2 %3 %4 %5 %6 %7 %8 %9 + +@echo off +goto :eof + :Version rem Display the current build version information call "%dir%find_msbuild.bat" %MSBUILD% |