[libvirt PATCH 2/6] meson: actually check for -Wframe-larger-than

Daniel P. Berrangé berrange at redhat.com
Thu Apr 8 10:58:19 UTC 2021


All other warning flags are checked for compiler support, so we
shouldn't blindly assume this one always exists.

Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
---
 meson.build | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/meson.build b/meson.build
index 7565eace17..97d9c52165 100644
--- a/meson.build
+++ b/meson.build
@@ -499,10 +499,12 @@ if cc.has_argument('-Wsuggest-attribute=format')
 endif
 
 # used in tests
-cc_flags_relaxed_frame_limit = [
+cc_flags_relaxed_frame_limit = []
+if cc.has_argument('-Wframe-larger-than=262144')
+  cc_flags_relaxed_frame_limit += [
   '-Wframe-larger-than=262144',
-]
-
+  ]
+endif
 
 # various linker checks
 
-- 
2.30.2




More information about the libvir-list mailing list