Issue #7406: Fix some occurrences of potential signed overflow in int
[python.git] / PC / VS8.0 / build_pgo.bat
blobd28a7673002b49aaa6e90cb35410d147b4304b15
1 @echo off\r
2 rem A batch program to build PGO (Profile guided optimization) by first\r
3 rem building instrumented binaries, then running the testsuite, and\r
4 rem finally building the optimized code.\r
5 rem Note, after the first instrumented run, one can just keep on\r
6 rem building the PGUpdate configuration while developing.\r
7 \r
8 setlocal\r
9 set platf=Win32\r
11 rem use the performance testsuite.  This is quick and simple\r
12 set job1=..\..\tools\pybench\pybench.py -n 1 -C 1 --with-gc\r
13 set path1=..\..\tools\pybench\r
15 rem or the whole testsuite for more thorough testing\r
16 set job2=..\..\lib\test\regrtest.py\r
17 set path2=..\..\lib\r
19 set job=%job1%\r
20 set clrpath=%path1%\r
22 :CheckOpts\r
23 if "%1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts\r
24 if "%1"=="-2" (set job=%job2%) & (set clrpath=%path2%) & shift & goto CheckOpts\r
26 set PGI=%platf%-pgi\r
27 set PGO=%platf%-pgo\r
29 @echo on\r
30 rem build the instrumented version\r
31 call build -p %platf% -c PGInstrument\r
33 rem remove .pyc files, .pgc files and execute the job\r
34 %PGI%\python.exe rmpyc.py %clrpath%\r
35 del %PGI%\*.pgc\r
36 %PGI%\python.exe %job%\r
38 rem finally build the optimized version\r
39 if exist %PGO% del /s /q %PGO%\r
40 call build -p %platf% -c PGUpdate\r