From 575f9135ae70d21a113e26f780e9341c1927f36a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 31 Aug 2021 21:10:53 +0200 Subject: [PATCH] meson-pgo: do mode validation and mode evaluation at the same time --- meson-pgo.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/meson-pgo.sh b/meson-pgo.sh index 6a366f79..ed673316 100755 --- a/meson-pgo.sh +++ b/meson-pgo.sh @@ -14,15 +14,6 @@ source_dir=$(realpath "${2}") build_dir=$(realpath "${3}") shift 3 -case ${mode} in - none|auto|partial|full|full-headless-sway) - ;; - - *) - usage_and_die - ;; -esac - # meson will complain if source dir is invalid if [ -d "${build_dir}" ]; then @@ -52,6 +43,9 @@ case $(${CC-cc} --version) in esac case ${mode} in + partial|full|full-headless-sway) + ;; + none) do_pgo=no ;; @@ -65,6 +59,10 @@ case ${mode} in mode=partial fi ;; + + *) + usage_and_die + ;; esac # echo "source: ${source_dir}"