summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2016-11-15 00:15:39 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2016-11-15 00:15:39 (GMT)
commite044dfa22b4d4cef982fbf01f8f8f6d971381148 (patch)
tree9cc2ca08a59aa6134387ad29c45b2456574c36e0
parent63e6a7c3f4b72db95fff8fdac60bfcb8f1fd56e5 (diff)
parent4468bed2fcb29e614847b8576b36344c99f3552e (diff)
downloadcpython-e044dfa22b4d4cef982fbf01f8f8f6d971381148.zip
cpython-e044dfa22b4d4cef982fbf01f8f8f6d971381148.tar.gz
cpython-e044dfa22b4d4cef982fbf01f8f8f6d971381148.tar.bz2
Issue #28573: Avoid setting up env too many times during build
-rw-r--r--PCbuild/build.bat2
-rw-r--r--Tools/msi/buildrelease.bat37
2 files changed, 10 insertions, 29 deletions
diff --git a/PCbuild/build.bat b/PCbuild/build.bat
index 88b1f06..ffcc197 100644
--- a/PCbuild/build.bat
+++ b/PCbuild/build.bat
@@ -120,9 +120,9 @@ if "%do_pgo%"=="true" (
@echo off
call :Kill
set conf=PGUpdate
+ set target=Build
)
goto Build
-
:Kill
echo on
msbuild "%dir%\pythoncore.vcxproj" /t:KillPython %verbose%^
diff --git a/Tools/msi/buildrelease.bat b/Tools/msi/buildrelease.bat
index a1f9ec7..9a20a56 100644
--- a/Tools/msi/buildrelease.bat
+++ b/Tools/msi/buildrelease.bat
@@ -35,7 +35,7 @@ set BUILDX86=
set BUILDX64=
set TARGET=Rebuild
set TESTTARGETDIR=
-set PGO=default
+set PGO=-m test -q --pgo
set BUILDNUGET=1
set BUILDZIP=1
@@ -109,14 +109,12 @@ exit /B 0
@echo off
if "%1" EQU "x86" (
- call "%PCBUILD%env.bat" x86
set PGO=
set BUILD=%PCBUILD%win32\
set BUILD_PLAT=Win32
set OUTDIR_PLAT=win32
set OBJDIR_PLAT=x86
) else (
- call "%PCBUILD%env.bat" amd64
set BUILD=%PCBUILD%amd64\
set PGO=%~2
set BUILD_PLAT=x64
@@ -149,29 +147,17 @@ if not "%SKIPBUILD%" EQU "1" (
@echo off
if "%PGO%" EQU "" (
- @call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -t %TARGET% %CERTOPTS%
+ set PGOOPTS=
) else (
- @call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -c PGInstrument -t %TARGET% %CERTOPTS%
- @if errorlevel 1 exit /B
-
- @del "%BUILD%*.pgc"
- if "%PGO%" EQU "default" (
- "%BUILD%python.exe" -m test -q --pgo
- ) else if "%PGO%" EQU "default2" (
- "%BUILD%python.exe" -m test -r -q --pgo
- "%BUILD%python.exe" -m test -r -q --pgo
- ) else if "%PGO%" EQU "default10" (
- for /L %%i in (0, 1, 9) do "%BUILD%python.exe" -m test -q -r --pgo
- ) else (
- "%BUILD%python.exe" %PGO%
- )
-
- @call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -c PGUpdate -t Build %CERTOPTS%
+ set PGOOPTS=--pgo --pgojob "%PGO%"
)
+ @call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -t %TARGET% %CERTOPTS% %PGOOPTS%
@if errorlevel 1 exit /B
+ @rem build.bat turns echo back on, so we disable it again
@echo off
)
+call "%PCBUILD%env.bat"
if "%OUTDIR_PLAT%" EQU "win32" (
msbuild "%D%launcher\launcher.wixproj" /p:Platform=x86 %CERTOPTS% /p:ReleaseUri=%RELEASE_URI%
if errorlevel 1 exit /B
@@ -220,10 +206,9 @@ echo --build (-b) Incrementally build Python rather than rebuilding
echo --skip-build (-B) Do not build Python (just do the installers)
echo --skip-doc (-D) Do not build documentation
echo --pgo Specify PGO command for x64 installers
-echo --skip-pgo Build x64 installers using PGO
+echo --skip-pgo Build x64 installers without using PGO
echo --skip-nuget Do not build Nuget packages
echo --skip-zip Do not build embeddable package
-echo --pgo Build x64 installers using PGO
echo --download Specify the full download URL for MSIs
echo --test Specify the test directory to run the installer tests
echo -h Display this help information
@@ -231,12 +216,8 @@ echo.
echo If no architecture is specified, all architectures will be built.
echo If --test is not specified, the installer tests are not run.
echo.
-echo For the --pgo option, any Python command line can be used as well as the
-echo following shortcuts:
-echo Shortcut Description
-echo default Test suite with --pgo
-echo default2 2x test suite with --pgo and randomized test order
-echo default10 10x test suite with --pgo and randomized test order
+echo For the --pgo option, any Python command line can be used, or 'default' to
+echo use the default task (-m test --pgo).
echo.
echo The following substitutions will be applied to the download URL:
echo Variable Description Example