Skip to content

Commit d961a40

Browse files
committed
Preserve JIT shim object during PGO clean
1 parent 3883cef commit d961a40

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Makefile.pre.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3226,9 +3226,7 @@ $(JIT_GENERATED_STAMP): $(JIT_DEPS)
32263226
@REGEN_JIT_COMMAND@
32273227
@touch $@
32283228

3229-
# The stamp regenerates all JIT outputs as a group. Keep it order-only so its
3230-
# newer timestamp does not make each generated artifact look stale.
3231-
$(JIT_BUILD_TARGETS): | $(JIT_GENERATED_STAMP)
3229+
$(JIT_BUILD_TARGETS): $(JIT_GENERATED_STAMP)
32323230
@if test ! -f "$@"; then \
32333231
rm -f $(JIT_GENERATED_STAMP); \
32343232
$(MAKE) $(JIT_GENERATED_STAMP); \
@@ -3325,7 +3323,9 @@ docclean:
33253323
# data. The PGO data is only valid if source code remains unchanged.
33263324
.PHONY: clean-retain-profile
33273325
clean-retain-profile: pycremoval
3328-
find . -name '*.[oa]' -exec rm -f {} ';'
3326+
# Keep the generated JIT shim objects with the rest of the JIT generated
3327+
# files: they are regenerated as a group and tracked by .jit-stamp.
3328+
find . -name '*.[oa]' ! -name 'jit_shim*.o' -exec rm -f {} ';'
33293329
find . -name '*.s[ol]' -exec rm -f {} ';'
33303330
find . -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';'
33313331
find . -name '*.lto' -exec rm -f {} ';'

0 commit comments

Comments
 (0)