Mesa (staging/19.2): meson: drop -Wno-foo bug workaround for Meson < 0.46

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Sep 26 15:48:26 UTC 2019


Module: Mesa
Branch: staging/19.2
Commit: 0c56cb50c70c6136669213899e05402f0723e279
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0c56cb50c70c6136669213899e05402f0723e279

Author: Eric Engestrom <eric.engestrom at intel.com>
Date:   Mon Sep 23 18:37:01 2019 +0100

meson: drop -Wno-foo bug workaround for Meson < 0.46

This was a workaround for a bug in Meson that was fixed in 0.46 [1].

[1] https://github.com/mesonbuild/meson/pull/2284

Fixes: f7b6a8d12fdc446e3251 ("meson: bump required version to 0.46")
Signed-off-by: Eric Engestrom <eric.engestrom at intel.com>
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
(cherry picked from commit 3fd0afd5e3f7d2c5b8b5bfb77a111decfb193240)

---

 meson.build | 27 +++++++++------------------
 1 file changed, 9 insertions(+), 18 deletions(-)

diff --git a/meson.build b/meson.build
index 4afd8ca663b..0529d8acb54 100644
--- a/meson.build
+++ b/meson.build
@@ -865,6 +865,8 @@ foreach a : ['-Werror=implicit-function-declaration',
              '-Werror=incompatible-pointer-types',
              '-Werror=format',
              '-Wformat-security',
+             '-Wno-missing-field-initializers',
+             '-Wno-format-truncation',
              '-fno-math-errno',
              '-fno-trapping-math', '-Qunused-arguments']
   if cc.has_argument(a)
@@ -872,12 +874,6 @@ foreach a : ['-Werror=implicit-function-declaration',
   endif
 endforeach
 
-foreach a : ['missing-field-initializers', 'format-truncation']
-  if cc.has_argument('-W' + a)
-    c_args += '-Wno-' + a
-  endif
-endforeach
-
 c_vis_args = []
 if cc.has_argument('-fvisibility=hidden')
   c_vis_args += '-fvisibility=hidden'
@@ -888,6 +884,9 @@ cpp_args = []
 foreach a : ['-Werror=return-type',
              '-Werror=format',
              '-Wformat-security',
+             '-Wno-non-virtual-dtor',
+             '-Wno-missing-field-initializers',
+             '-Wno-format-truncation',
              '-fno-math-errno', '-fno-trapping-math',
              '-Qunused-arguments']
   if cpp.has_argument(a)
@@ -895,19 +894,11 @@ foreach a : ['-Werror=return-type',
   endif
 endforeach
 
-# For some reason, the test for -Wno-foo always succeeds with gcc, even if the
-# option is not supported. Hence, check for -Wfoo instead.
-
-foreach a : ['non-virtual-dtor', 'missing-field-initializers', 'format-truncation']
-  if cpp.has_argument('-W' + a)
-    cpp_args += '-Wno-' + a
-  endif
-endforeach
-
 no_override_init_args = []
-foreach a : ['override-init', 'initializer-overrides']
-  if cc.has_argument('-W' + a)
-    no_override_init_args += '-Wno-' + a
+foreach a : ['-Wno-override-init',
+             '-Wno-initializer-overrides']
+  if cc.has_argument(a)
+    no_override_init_args += a
   endif
 endforeach
 




More information about the mesa-commit mailing list