@@ -643,7 +643,7 @@ profile-gen-stamp: profile-clean-stamp
643
643
exit 1;\
644
644
fi
645
645
@echo "Building with support for profile generation:"
646
- $(MAKE) build_all_generate_profile
646
+ $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LDFLAGS_NODIST="$(LDFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)"
647
647
touch $@
648
648
649
649
# Run task with profile generation build to create profile information.
@@ -653,28 +653,16 @@ profile-run-stamp:
653
653
# enabled.
654
654
$(MAKE) profile-gen-stamp
655
655
# Next, run the profile task to generate the profile information.
656
- $(MAKE) run_profile_task
657
- $(MAKE) build_all_merge_profile
656
+ @ # FIXME: can't run for a cross build
657
+ $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true
658
+ $(LLVM_PROF_MERGER)
658
659
# Remove profile generation binary since we are done with it.
659
660
$(MAKE) clean-retain-profile
660
661
# This is an expensive target to build and it does not have proper
661
662
# makefile dependency information. So, we create a "stamp" file
662
663
# to record its completion and avoid re-running it.
663
664
touch $@
664
665
665
- .PHONY: build_all_generate_profile
666
- build_all_generate_profile:
667
- $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LDFLAGS_NODIST="$(LDFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)"
668
-
669
- .PHONY: run_profile_task
670
- run_profile_task:
671
- @ # FIXME: can't run for a cross build
672
- $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true
673
-
674
- .PHONY: build_all_merge_profile
675
- build_all_merge_profile:
676
- $(LLVM_PROF_MERGER)
677
-
678
666
# Compile Python binary with profile guided optimization.
679
667
# To force re-running of the profile task, remove the profile-run-stamp file.
680
668
.PHONY: profile-opt
0 commit comments