foot-pgo: Fix build with mold, fix cc == gcc

This commit is contained in:
Dylan Araps 2021-08-15 16:48:51 +03:00
parent 60d9a5937a
commit e94f25b763
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C
1 changed files with 7 additions and 2 deletions

View File

@ -11,12 +11,17 @@ case $("$CC" --version) in
export CFLAGS="$CFLAGS -Wno-ignored-optimization-argument"
;;
*gcc*)
*GCC*)
# PGO with < -O3 is slow > GCC 10.1.X.
export CFLAGS="$CFLAGS -O3"
;;
esac
# Mold does not yet support LTO.
case $(ld --version) in *mold*)
_lto=false
esac
mkdir -p bld/release
cd bld/release
@ -25,7 +30,7 @@ meson \
--buildtype=release \
--force-fallback-for=fcft,tllist \
-Dime=false \
-Db_lto=true \
-Db_lto="${_lto:-true}" \
../..
# Generate PGO data.