File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -837,7 +837,7 @@ check-app-store-compliance:
837837
838838# Profile generation build must start from a clean tree.
839839profile-clean-stamp:
840- $(MAKE) clean
840+ $(MAKE) clean-profile
841841 touch $@
842842
843843# Compile with profile generation enabled.
@@ -3250,7 +3250,6 @@ clean-retain-profile: pycremoval
32503250 -rm -rf Python/deepfreeze
32513251 -rm -f Python/frozen_modules/*.h
32523252 -rm -f Python/frozen_modules/MANIFEST
3253- -rm -f jit_stencils*.h
32543253 -find build -type f -a ! -name '*.gc??' -exec rm -f {} ';'
32553254 -rm -f Include/pydtrace_probes.h
32563255 -rm -f profile-gen-stamp
@@ -3269,13 +3268,21 @@ profile-removal:
32693268 rm -f profile-run-stamp
32703269 rm -f profile-bolt-stamp
32713270
3272- .PHONY: clean
3273- clean: clean-retain-profile clean-bolt
3271+ .PHONY: clean-profile
3272+ clean-profile : clean-retain-profile clean-bolt
32743273 @if test @DEF_MAKE_ALL_RULE@ = profile-opt -o @DEF_MAKE_ALL_RULE@ = bolt-opt; then \
32753274 rm -f profile-gen-stamp profile-clean-stamp; \
32763275 $(MAKE) profile-removal; \
32773276 fi
32783277
3278+ # gh-141808: The JIT stencils are deliberately kept in clean-profile
3279+ .PHONY: clean-jit-stencils
3280+ clean-jit-stencils:
3281+ -rm -f jit_stencils*.h
3282+
3283+ .PHONY: clean
3284+ clean: clean-profile clean-jit-stencils
3285+
32793286.PHONY: clobber
32803287clobber: clean
32813288 -rm -f $(BUILDPYTHON) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
Original file line number Diff line number Diff line change 1+ When running ``make clean-retain-profile ``, keep the
2+ generated JIT stencils. That way, the stencils are not generated twice when
3+ Profile-guided optimization (PGO) is used. It also allows distributors to
4+ supply their own pre-built JIT stencils.
You can’t perform that action at this time.
0 commit comments