@@ -35,7 +35,7 @@ set BUILDX86=
3535set BUILDX64 =
3636set TARGET = Rebuild
3737set TESTTARGETDIR =
38- set PGO = default
38+ set PGO = -m test -q --pgo
3939set BUILDNUGET = 1
4040set BUILDZIP = 1
4141
@@ -109,14 +109,12 @@ exit /B 0
109109@ echo off
110110
111111if " %1 " EQU " x86" (
112- call " %PCBUILD% env.bat" x86
113112 set PGO =
114113 set BUILD = %PCBUILD% win32\
115114 set BUILD_PLAT = Win32
116115 set OUTDIR_PLAT = win32
117116 set OBJDIR_PLAT = x86
118117) else (
119- call " %PCBUILD% env.bat" amd64
120118 set BUILD = %PCBUILD% amd64\
121119 set PGO = %~2
122120 set BUILD_PLAT = x64
@@ -143,37 +141,18 @@ if not "%CERTNAME%" EQU "" (
143141)
144142
145143if not " %SKIPBUILD% " EQU " 1" (
146- @ call " %PCBUILD% build.bat" -e -p %BUILD_PLAT% -d -t %TARGET% %CERTOPTS%
147- @ if errorlevel 1 exit /B
148- @ rem build.bat turns echo back on, so we disable it again
149- @ echo off
150-
151144 if " %PGO% " EQU " " (
152- @ call " %PCBUILD% build.bat " -e -p %BUILD_PLAT% -t %TARGET% %CERTOPTS%
145+ set PGOOPTS =
153146 ) else (
154- @ call " %PCBUILD% build.bat" -e -p %BUILD_PLAT% -c PGInstrument -t %TARGET% %CERTOPTS%
155- @ if errorlevel 1 exit /B
156-
157- @ del " %BUILD% *.pgc"
158- if " %PGO% " EQU " default" (
159- " %BUILD% python.exe" -m test -q --pgo
160- ) else if " %PGO% " EQU " default2" (
161- " %BUILD% python.exe" -m test -r -q --pgo
162- " %BUILD% python.exe" -m test -r -q --pgo
163- ) else if " %PGO% " EQU " default10" (
164- for /L %%i in (0, 1, 9) do " %BUILD% python.exe" -m test -q -r --pgo
165- ) else if " %PGO% " EQU " pybench" (
166- " %BUILD% python.exe" " %PCBUILD% ..\Tools\pybench\pybench.py"
167- ) else (
168- " %BUILD% python.exe" %PGO%
169- )
170-
171- @ call " %PCBUILD% build.bat" -e -p %BUILD_PLAT% -c PGUpdate -t Build %CERTOPTS%
147+ set PGOOPTS = --pgo --pgojob " %PGO% "
172148 )
149+ @ call " %PCBUILD% build.bat" -e -p %BUILD_PLAT% -t %TARGET% %CERTOPTS% %PGOOPTS%
173150 @ if errorlevel 1 exit /B
151+ @ rem build.bat turns echo back on, so we disable it again
174152 @ echo off
175153)
176154
155+ call " %PCBUILD% env.bat"
177156if " %OUTDIR_PLAT% " EQU " win32" (
178157 msbuild " %D% launcher\launcher.wixproj" /p:Platform=x86 %CERTOPTS% /p:ReleaseUri=%RELEASE_URI%
179158 if errorlevel 1 exit /B
@@ -222,24 +201,18 @@ echo --build (-b) Incrementally build Python rather than rebuilding
222201echo --skip-build (-B) Do not build Python (just do the installers)
223202echo --skip-doc (-D) Do not build documentation
224203echo --pgo Specify PGO command for x64 installers
225- echo --skip-pgo Build x64 installers using PGO
204+ echo --skip-pgo Build x64 installers without using PGO
226205echo --skip-nuget Do not build Nuget packages
227206echo --skip-zip Do not build embeddable package
228- echo --pgo Build x64 installers using PGO
229207echo --download Specify the full download URL for MSIs
230208echo --test Specify the test directory to run the installer tests
231209echo -h Display this help information
232210echo .
233211echo If no architecture is specified, all architectures will be built.
234212echo If --test is not specified, the installer tests are not run.
235213echo .
236- echo For the --pgo option, any Python command line can be used as well as the
237- echo following shortcuts:
238- echo Shortcut Description
239- echo default Test suite with --pgo
240- echo default2 2x test suite with --pgo and randomized test order
241- echo default10 10x test suite with --pgo and randomized test order
242- echo pybench pybench script
214+ echo For the --pgo option, any Python command line can be used, or 'default' to
215+ echo use the default task (-m test --pgo).
243216echo .
244217echo The following substitutions will be applied to the download URL:
245218echo Variable Description Example
0 commit comments