meson: Ignore unused variables when assertions are disabled
authorpal1000 <liviuprodea@yahoo.com>
Mon, 6 Feb 2023 23:35:45 +0000 (01:35 +0200)
committerEric Engestrom <eric@engestrom.ch>
Wed, 8 Feb 2023 20:34:45 +0000 (20:34 +0000)
commit9d4413d65f25279c8d0f0846322a4eae772a8bc3
treeef54272f7d072ca371def9f08f1fca60c92d305c
parent3e5da1cc33d95d2feae56cde8b09eb1d7a18cdcd
meson: Ignore unused variables when assertions are disabled

Fixes: 46b099e3
("meson: Ignore unused variables in release builds")

46b099e3 has some issues:
- it doesn't enable unused variables warning on release builds
with assertions enabled;
- it doesn't disable unused variables warning on debug builds
with assertions disabled;
- it doesn't disable unused variables warning when building
with MSVC and assertions are disabled regardless of buildtype,
see #8147. 3/4 regressions reported there have this limitation
alone as root cause.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21154>
(cherry picked from commit 4347072443867f6337c33ffc330263bb851d9839)
.pick_status.json
meson.build