From: Diego Russo Date: Tue, 5 May 2026 15:20:12 +0000 (+0100) Subject: gh-149353: Preserve JIT shim object during PGO clean (#149387) X-Git-Tag: v3.15.0b1~35 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4fa5c0428213f9b80a2b3e25e49b52e8596d8528;p=thirdparty%2FPython%2Fcpython.git gh-149353: Preserve JIT shim object during PGO clean (#149387) --- diff --git a/Makefile.pre.in b/Makefile.pre.in index fe16c73204dc..dce0139d8d6e 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 000000000000..3a3bad2906f7 --- /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.