blob: 1cda15ddcd8d93ff0d7060c5450c102c49305271 [file] [log] [blame]
Python doesn't quite support the flow of "let me grab a profile from this build
now; I plan to use it later."
In order to *get* the profile, we just need to remove the last profile-removal
step.
Note that we have a special string here that's grep'ed for by the PGO generation
script -- python's PGO profile generation goes something like "run all of the
tests, and collect the profile that results." A small number of the tests break
the sandbox, so the sandbox will fail out our `ebuild` commands regardless of
what we do. In order to work around that, we have the "Full build with [...]"
string below, which functions as the "we did the thing correctly" marker. :)
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -476,7 +476,7 @@ profile-opt:
@echo "Rebuilding with profile guided optimizations:"
$(MAKE) clean
$(MAKE) build_all_use_profile
- $(MAKE) profile-removal
+ echo "Full build with profile completed successfully."
build_all_generate_profile:
$(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LDFLAGS_NODIST="$(LDFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)"