PKGBUILD: only do a PGO build if we have a Wayland session

This commit is contained in:
Daniel Eklöf 2020-03-06 19:33:42 +01:00
parent e0ef500045
commit a98eb771fa
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -16,6 +16,7 @@ pkgver() {
build() { build() {
meson --prefix=/usr --buildtype=release --wrap-mode=nofallback -Db_lto=true .. meson --prefix=/usr --buildtype=release --wrap-mode=nofallback -Db_lto=true ..
if [[ -v WAYLAND_DISPLAY ]]; then
meson configure -Db_pgo=generate meson configure -Db_pgo=generate
find -name "*.gcda" -delete find -name "*.gcda" -delete
ninja ninja
@ -25,6 +26,8 @@ build() {
rm "${tmp_file}" rm "${tmp_file}"
meson configure -Db_pgo=use meson configure -Db_pgo=use
fi
ninja ninja
} }