[v20,21/27] config: define no_wvla_cflag
Checks
Commit Message
We define no_wvla_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@linux.microsoft.com>
---
config/meson.build | 8 ++++++++
1 file changed, 8 insertions(+)
@@ -342,6 +342,14 @@ if cc.get_id() == 'intel'
warning_flags += '-diag-disable=@0@'.format(i)
endforeach
endif
+
+no_wvla_cflag = []
+if cc.has_argument('-Wvla')
+ if not is_windows
+ no_wvla_cflag = '-Wno-vla'
+ endif
+endif
+
foreach arg: warning_flags
if cc.has_argument(arg)
add_project_arguments(arg, language: 'c')