Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ check-app-store-compliance:

# Profile generation build must start from a clean tree.
profile-clean-stamp:
$(MAKE) clean
$(MAKE) clean-profile
touch $@

# Compile with profile generation enabled.
Expand Down Expand Up @@ -3239,7 +3239,6 @@ clean-retain-profile: pycremoval
-rm -rf Python/deepfreeze
-rm -f Python/frozen_modules/*.h
-rm -f Python/frozen_modules/MANIFEST
-rm -f jit_stencils*.h
-find build -type f -a ! -name '*.gc??' -exec rm -f {} ';'
-rm -f Include/pydtrace_probes.h
-rm -f profile-gen-stamp
Expand All @@ -3258,13 +3257,21 @@ profile-removal:
rm -f profile-run-stamp
rm -f profile-bolt-stamp

.PHONY: clean
clean: clean-retain-profile clean-bolt
.PHONY: clean-profile
clean-profile: clean-retain-profile clean-bolt
@if test @DEF_MAKE_ALL_RULE@ = profile-opt -o @DEF_MAKE_ALL_RULE@ = bolt-opt; then \
rm -f profile-gen-stamp profile-clean-stamp; \
$(MAKE) profile-removal; \
fi

# gh-141808: The JIT stencils are deliberately kept in clean-profile
.PHONY: clean-jit-stencils
clean-jit-stencils:
-rm -f jit_stencils*.h

.PHONY: clean
clean: clean-profile clean-jit-stencils

.PHONY: clobber
clobber: clean
-rm -f $(BUILDPYTHON) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
When running ``make clean-retain-profile``, keep the
generated JIT stencils. That way, the stencils are not generated twice when
Profile-guided optimization (PGO) is used. It also allows distributors to
supply their own pre-built JIT stencils.
Loading