Usage: meson-pgo.sh none|auto|partial|full|full-headless-sway <source-dir> <build-dir> <meson-options>
build-dir must not exist before the script is run (but if it does, the script will tell you so, and exit).
Supported compilers: gcc and clang
The script does not add any custom meson options, except configure -Db_pgo. It also does not run the final ninja call (since it's kind of a meson wrapper script). Thus, you probably want to call it like this:
meson-pgo.sh auto . /tmp/foot-pgo-build --buildtype=release -Db_lto=true && \
ninja -C /tmp/foot-pgo-build
Note the new full-headless-sway mode. This runs a full PGO build, but in a headless Sway instance. This means it can be used on e.g. sandboxed build servers (which would have to add sway as a build dependency).
auto will do a full-headless-sway build if sway is available. If not, it will do a full PGO build in the currently running compositor, if WAYLAND_DISPLAY is set. If no it falls back to a partial PGO build.
TODO
- script cleanup
- document in INSTALL.md
- verify performance of a full-headless build matches a "regular" full build
Closes #701