meson-pgo: do mode validation and mode evaluation at the same time

This commit is contained in:
Daniel Eklöf 2021-08-31 21:10:53 +02:00
parent ac9b3025d8
commit 575f9135ae
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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}"