George Burgess IV | ddce0e2 | 2021-03-23 15:43:20 -0700 | [diff] [blame^] | 1 | Python doesn't quite support the flow of "let me grab a profile from this build |
| 2 | now; I plan to use it later." |
| 3 | |
| 4 | In order to *get* the profile, we just need to remove the last profile-removal |
| 5 | step. |
| 6 | |
| 7 | Note that we have a special string here that's grep'ed for by the PGO generation |
| 8 | script -- python's PGO profile generation goes something like "run all of the |
| 9 | tests, and collect the profile that results." A small number of the tests break |
| 10 | the sandbox, so the sandbox will fail out our `ebuild` commands regardless of |
| 11 | what we do. In order to work around that, we have the "Full build with [...]" |
| 12 | string below, which functions as the "we did the thing correctly" marker. :) |
| 13 | |
| 14 | --- a/Makefile.pre.in |
| 15 | +++ b/Makefile.pre.in |
| 16 | @@ -476,7 +476,7 @@ profile-opt: |
| 17 | @echo "Rebuilding with profile guided optimizations:" |
| 18 | $(MAKE) clean |
| 19 | $(MAKE) build_all_use_profile |
| 20 | - $(MAKE) profile-removal |
| 21 | + echo "Full build with profile completed successfully." |
| 22 | |
| 23 | build_all_generate_profile: |
| 24 | $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LDFLAGS_NODIST="$(LDFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)" |