gh-148644: Propagate the PGO job exit code in PCbuild/build.bat (GH-148645)

This commit is contained in:
Régis Desgroppes
2026-04-20 16:18:10 +02:00
committed by GitHub
parent 789120e826
commit 5c5dae0282
2 changed files with 12 additions and 7 deletions
@@ -0,0 +1 @@
Errors during the PGO training job on Windows are no longer ignored, and a non-zero return code will cause the build to fail.
+11 -7
View File
@@ -170,16 +170,20 @@ if "%do_pgo%"=="true" (
del /s "%dir%\*.pgc"
del /s "%dir%\..\Lib\*.pyc"
set conf=PGUpdate
if "%clean%"=="false" (
echo on
call "%dir%\..\python.bat" %pgo_job%
@echo off
call :Kill
set target=Build
)
if "%clean%"=="false" goto :RunPgoJob
)
goto :Build
:RunPgoJob
echo on
call "%dir%\..\python.bat" %pgo_job%
@echo off
set pgo_errorlevel=%ERRORLEVEL%
call :Kill
if %pgo_errorlevel% NEQ 0 exit /B %pgo_errorlevel%
set target=Build
goto :Build
:Kill
echo on
%MSBUILD% "%dir%\pythoncore.vcxproj" /t:KillPython %verbose%^