[PATCH v17 21/25] config: define no_vla_cflag
Andre Muezerie
andremue at linux.microsoft.com
Thu Jan 30 15:32:37 CET 2025
We define no_vla_cflag in a top directory so that it can be used by
meson.build files in lower directories that are not yet VLA-free.
Signed-off-by: Andre Muezerie <andremue at linux.microsoft.com>
---
config/meson.build | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/config/meson.build b/config/meson.build
index 6aaad6d8a4..6be928e04b 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -342,6 +342,14 @@ if cc.get_id() == 'intel'
warning_flags += '-diag-disable=@0@'.format(i)
endforeach
endif
+
+no_vla_cflag = []
+if cc.has_argument('-Wvla')
+ if not is_windows
+ no_vla_cflag = '-Wno-vla'
+ endif
+endif
+
foreach arg: warning_flags
if cc.has_argument(arg)
add_project_arguments(arg, language: 'c')
--
2.47.2.vfs.0.1
More information about the dev
mailing list