From ba38c8484fb0e51a7221ef7b57796a56170b13b8 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 18 Jul 2021 06:47:02 +0300 Subject: [PATCH] foot-pgo: minor fixes --- wayland/foot-pgo/build | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/wayland/foot-pgo/build b/wayland/foot-pgo/build index d22631f6..041f45fa 100755 --- a/wayland/foot-pgo/build +++ b/wayland/foot-pgo/build @@ -9,12 +9,16 @@ sed "/subdir('doc')/d" meson.build > _ mv -f _ meson.build -# PGO with < -O3 is slow > GCC 10.1.X. -export CFLAGS="$CFLAGS -O3" +case $("$CC" --version) in + *clang*) + # Clang requires this for PGO. + export CFLAGS="$CFLAGS -Wno-ignored-optimization-argument" + ;; -# Clang requires this for PGO. -case $("${CC:-cc}" --version) in *clang*) - export CFLAGS="$CFLAGS -Wno-ignored-optimization-argument" + *gcc*) + # PGO with < -O3 is slow > GCC 10.1.X. + export CFLAGS="$CFLAGS -O3" + ;; esac mkdir -p bld/release