https://github.com/python/cpython/commit/4fa5c0428213f9b80a2b3e25e49b52e8596d8528
commit: 4fa5c0428213f9b80a2b3e25e49b52e8596d8528
branch: main
author: Diego Russo <[email protected]>
committer: diegorusso <[email protected]>
date: 2026-05-05T16:20:12+01:00
summary:

gh-149353: Preserve JIT shim object during PGO clean (#149387)

files:
A Misc/NEWS.d/next/Build/2026-05-04-23-07-45.gh-issue-149353.XfM8aQ.rst
M Makefile.pre.in

diff --git a/Makefile.pre.in b/Makefile.pre.in
index fe16c73204dcf8..dce0139d8d6e35 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -3330,7 +3330,9 @@ docclean:
 # data.  The PGO data is only valid if source code remains unchanged.
 .PHONY: clean-retain-profile
 clean-retain-profile: pycremoval
-       find . -name '*.[oa]' -exec rm -f {} ';'
+       # Keep the generated JIT shim objects with the rest of the JIT generated
+       # files: they are regenerated as a group and tracked by .jit-stamp.
+       find . -name '*.[oa]' ! -name 'jit_shim*.o' -exec rm -f {} ';'
        find . -name '*.s[ol]' -exec rm -f {} ';'
        find . -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';'
        find . -name '*.lto' -exec rm -f {} ';'
diff --git 
a/Misc/NEWS.d/next/Build/2026-05-04-23-07-45.gh-issue-149353.XfM8aQ.rst 
b/Misc/NEWS.d/next/Build/2026-05-04-23-07-45.gh-issue-149353.XfM8aQ.rst
new file mode 100644
index 00000000000000..3a3bad2906f783
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2026-05-04-23-07-45.gh-issue-149353.XfM8aQ.rst
@@ -0,0 +1,2 @@
+Avoid unnecessary JIT-related rebuilds during ``make install`` after
+``--enable-optimizations`` builds.

_______________________________________________
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]

Reply via email to