Skip to content

Commit 349a92e

Browse files
committed
Have a separate clean-profile make target
This allows us not to call make clean from the PGO task.
1 parent 24075b3 commit 349a92e

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

Makefile.pre.in

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ check-app-store-compliance:
837837

838838
# Profile generation build must start from a clean tree.
839839
profile-clean-stamp:
840-
$(MAKE) clean
840+
$(MAKE) clean-profile
841841
touch $@
842842

843843
# Compile with profile generation enabled.
@@ -3257,13 +3257,21 @@ profile-removal:
32573257
rm -f profile-run-stamp
32583258
rm -f profile-bolt-stamp
32593259

3260-
.PHONY: clean
3261-
clean: clean-retain-profile clean-bolt
3260+
.PHONY: clean-profile
3261+
clean-profile: clean-retain-profile clean-bolt
32623262
@if test @DEF_MAKE_ALL_RULE@ = profile-opt -o @DEF_MAKE_ALL_RULE@ = bolt-opt; then \
32633263
rm -f profile-gen-stamp profile-clean-stamp; \
32643264
$(MAKE) profile-removal; \
32653265
fi
32663266

3267+
# gh-141808: The JIT stencils are deliberately kept in clean-profile
3268+
.PHONY: clean-jit-stencils
3269+
clean-jit-stencils:
3270+
-rm -f jit_stencils*.h
3271+
3272+
.PHONY: clean
3273+
clean: clean-profile clean-jit-stencils
3274+
32673275
.PHONY: clobber
32683276
clobber: clean
32693277
-rm -f $(BUILDPYTHON) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
@@ -3276,11 +3284,6 @@ clobber: clean
32763284
-rm -f python-config.py python-config
32773285
-rm -rf cross-build
32783286

3279-
# gh-141808: The JIT stencils are deliberately kept in make clean(-retain-profile)
3280-
.PHONY: clean-jit-stencils
3281-
clean-jit-stencils:
3282-
-rm -f jit_stencils*.h
3283-
32843287
# Make things extra clean, before making a distribution:
32853288
# remove all generated files, even Makefile[.pre]
32863289
# Keep configure and Python-ast.[ch], it's possible they can't be generated
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
When running ``make clean`` or ``make clean-retain-profile``, keep the
1+
When running ``make clean-retain-profile``, keep the
22
generated JIT stencils. That way, the stencils are not generated twice when
33
Profile-guided optimization (PGO) is used. It also allows distributors to
44
supply their own pre-built JIT stencils.

0 commit comments

Comments
 (0)