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 @@ -834,7 +834,7 @@ check-app-store-compliance:
834834
835835# Profile generation build must start from a clean tree.
836836profile-clean-stamp:
837- $(MAKE) clean
837+ $(MAKE) clean-profile
838838 touch $@
839839
840840# Compile with profile generation enabled.
@@ -3222,7 +3222,6 @@ clean-retain-profile: pycremoval
32223222 -rm -rf Python/deepfreeze
32233223 -rm -f Python/frozen_modules/*.h
32243224 -rm -f Python/frozen_modules/MANIFEST
3225- -rm -f jit_stencils.h
32263225 -find build -type f -a ! -name '*.gc??' -exec rm -f {} ';'
32273226 -rm -f Include/pydtrace_probes.h
32283227 -rm -f profile-gen-stamp
@@ -3241,13 +3240,21 @@ profile-removal:
32413240 rm -f profile-run-stamp
32423241 rm -f profile-bolt-stamp
32433242
3244- .PHONY: clean
3245- clean: clean-retain-profile clean-bolt
3243+ .PHONY: clean-profile
3244+ clean-profile : clean-retain-profile clean-bolt
32463245 @if test @DEF_MAKE_ALL_RULE@ = profile-opt -o @DEF_MAKE_ALL_RULE@ = bolt-opt; then \
32473246 rm -f profile-gen-stamp profile-clean-stamp; \
32483247 $(MAKE) profile-removal; \
32493248 fi
32503249
3250+ # gh-141808: The JIT stencils are deliberately kept in clean-profile
3251+ .PHONY: clean-jit-stencils
3252+ clean-jit-stencils:
3253+ -rm -f jit_stencils*.h
3254+
3255+ .PHONY: clean
3256+ clean: clean-profile clean-jit-stencils
3257+
32513258.PHONY: clobber
32523259clobber: clean
32533260 -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