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 @@ -730,7 +730,7 @@ check-app-store-compliance:
730730
731731# Profile generation build must start from a clean tree.
732732profile-clean-stamp:
733- $(MAKE) clean
733+ $(MAKE) clean-profile
734734 touch $@
735735
736736# Compile with profile generation enabled.
@@ -2972,7 +2972,6 @@ clean-retain-profile: pycremoval
29722972 -rm -rf Python/deepfreeze
29732973 -rm -f Python/frozen_modules/*.h
29742974 -rm -f Python/frozen_modules/MANIFEST
2975- -rm -f jit_stencils.h
29762975 -find build -type f -a ! -name '*.gc??' -exec rm -f {} ';'
29772976 -rm -f Include/pydtrace_probes.h
29782977 -rm -f profile-gen-stamp
@@ -2991,13 +2990,21 @@ profile-removal:
29912990 rm -f profile-run-stamp
29922991 rm -f profile-bolt-stamp
29932992
2994- .PHONY: clean
2995- clean: clean-retain-profile clean-bolt
2993+ .PHONY: clean-profile
2994+ clean-profile : clean-retain-profile clean-bolt
29962995 @if test @DEF_MAKE_ALL_RULE@ = profile-opt -o @DEF_MAKE_ALL_RULE@ = bolt-opt; then \
29972996 rm -f profile-gen-stamp profile-clean-stamp; \
29982997 $(MAKE) profile-removal; \
29992998 fi
30002999
3000+ # gh-141808: The JIT stencils are deliberately kept in clean-profile
3001+ .PHONY: clean-jit-stencils
3002+ clean-jit-stencils:
3003+ -rm -f jit_stencils*.h
3004+
3005+ .PHONY: clean
3006+ clean: clean-profile clean-jit-stencils
3007+
30013008.PHONY: clobber
30023009clobber: clean
30033010 -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