]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-149353: Preserve JIT shim object during PGO clean (#149387)
authorDiego Russo <diego.russo@arm.com>
Tue, 5 May 2026 15:20:12 +0000 (16:20 +0100)
committerGitHub <noreply@github.com>
Tue, 5 May 2026 15:20:12 +0000 (16:20 +0100)
Makefile.pre.in
Misc/NEWS.d/next/Build/2026-05-04-23-07-45.gh-issue-149353.XfM8aQ.rst [new file with mode: 0644]

index fe16c73204dcf869e210b7fffc3d7dba45252fdf..dce0139d8d6e35a488f282f3f6daed7c7486fbca 100644 (file)
@@ -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 (file)
index 0000000..3a3bad2
--- /dev/null
@@ -0,0 +1,2 @@
+Avoid unnecessary JIT-related rebuilds during ``make install`` after
+``--enable-optimizations`` builds.