Skip to content

Commit a2c21db

Browse files
committed
gh-141808: Don't remove the JIT stencils when building with PGO
See https://discuss.python.org/t/building-the-jit-with-pre-built-stencils/91838/12
1 parent 77cb39e commit a2c21db

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Makefile.pre.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3239,7 +3239,6 @@ clean-retain-profile: pycremoval
32393239
-rm -rf Python/deepfreeze
32403240
-rm -f Python/frozen_modules/*.h
32413241
-rm -f Python/frozen_modules/MANIFEST
3242-
-rm -f jit_stencils*.h
32433242
-find build -type f -a ! -name '*.gc??' -exec rm -f {} ';'
32443243
-rm -f Include/pydtrace_probes.h
32453244
-rm -f profile-gen-stamp
@@ -3290,6 +3289,8 @@ distclean: clobber docclean
32903289
Modules/ld_so_aix Modules/python.exp Misc/python.pc \
32913290
Misc/python-embed.pc Misc/python-config.sh
32923291
-rm -f python*-gdb.py
3292+
# gh-141808: The JIT stencils are deliberately kept in make clean(-retain-profile)
3293+
-rm -f jit_stencils*.h
32933294
# Issue #28258: set LC_ALL to avoid issues with Estonian locale.
32943295
# Expansion is performed here by shell (spawned by make) itself before
32953296
# arguments are passed to find. So LC_ALL=C must be set as a separate
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
When running ``make clean`` or ``make clean-retain-profile``, keep the
2+
genearted JIT stencils. That way, the stencils are not genearted twice when
3+
Profile-guided optimization (PGO) is used. It also allows distributors to
4+
supply their own pre-built JIT stencils.

0 commit comments

Comments
 (0)