File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -245,6 +245,11 @@ if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_11}" ]; then
245
245
patch -p1 -i ${ROOT} /patch-pwd-remove-conditional.patch
246
246
fi
247
247
248
+ # The optimization make targets are both phony and non-phony. This leads
249
+ # to PGO targets getting reevaluated after a build when you use multiple
250
+ # make invocations. e.g. `make install` like we do below. Fix that.
251
+ patch -p1 -i ${ROOT} /patch-pgo-make-targets.patch
252
+
248
253
# We patched configure.ac above. Reflect those changes.
249
254
autoconf
250
255
Original file line number Diff line number Diff line change
1
+ diff --git a/Makefile.pre.in b/Makefile.pre.in
2
+ index b356f6293e..e584dede51 100644
3
+ --- a/Makefile.pre.in
4
+ +++ b/Makefile.pre.in
5
+ @@ -642,12 +642,16 @@ run_profile_task:
6
+ build_all_merge_profile:
7
+ $(LLVM_PROF_MERGER)
8
+
9
+ - # Compile Python binary with profile guided optimization.
10
+ - # To force re-running of the profile task, remove the profile-run-stamp file.
11
+ - profile-opt: profile-run-stamp
12
+ + profile-rebuild-stamp: profile-run-stamp
13
+ @echo "Rebuilding with profile guided optimizations:"
14
+ -rm -f profile-clean-stamp
15
+ $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_USE_FLAG)" LDFLAGS_NODIST="$(LDFLAGS_NODIST)"
16
+ + touch $@
17
+ +
18
+ + # Compile Python binary with profile guided optimization.
19
+ + # To force re-running of the profile task, remove the profile-run-stamp file.
20
+ + .PHONY: profile-opt
21
+ + profile-opt: profile-rebuild-stamp
22
+
23
+ # Compile and run with gcov
24
+ .PHONY=coverage coverage-lcov coverage-report
You can’t perform that action at this time.
0 commit comments