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