https://github.com/python/cpython/commit/5c5dae0282c5649886b6e37dd6d487a779fa70c5
commit: 5c5dae0282c5649886b6e37dd6d487a779fa70c5
branch: main
author: Régis Desgroppes <[email protected]>
committer: zooba <[email protected]>
date: 2026-04-20T15:18:10+01:00
summary:
gh-148644: Propagate the PGO job exit code in PCbuild/build.bat (GH-148645)
files:
A Misc/NEWS.d/next/Build/2026-04-17-21-45-32.gh-issue-148644.vwkknh.rst
M PCbuild/build.bat
diff --git
a/Misc/NEWS.d/next/Build/2026-04-17-21-45-32.gh-issue-148644.vwkknh.rst
b/Misc/NEWS.d/next/Build/2026-04-17-21-45-32.gh-issue-148644.vwkknh.rst
new file mode 100644
index 00000000000000..a0cc9c9358cb26
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2026-04-17-21-45-32.gh-issue-148644.vwkknh.rst
@@ -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.
diff --git a/PCbuild/build.bat b/PCbuild/build.bat
index 8fb2f096c93c0e..9d2f032f5a9355 100644
--- a/PCbuild/build.bat
+++ b/PCbuild/build.bat
@@ -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%^
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]