diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-08-31 19:10:53 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-09-12 08:39:43 +0000 |
| commit | 575f9135ae70d21a113e26f780e9341c1927f36a (patch) | |
| tree | dbb5a737643396b60b8778ea30345ce87f85ee2f | |
| parent | meson-pgo: improved argument validation (diff) | |
meson-pgo: do mode validation and mode evaluation at the same time
| -rwxr-xr-x | meson-pgo.sh | 16 |
1 files 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}" |
