Mesa (main): meson: add back -Werror=vla to msvc compat flags
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jun 3 07:49:47 UTC 2022
Module: Mesa
Branch: main
Commit: c21dfe3348694c23fff120b2286ff01402257294
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c21dfe3348694c23fff120b2286ff01402257294
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Mon May 23 11:58:55 2022 +0200
meson: add back -Werror=vla to msvc compat flags
Back when STATIC_ASSERT was prepared for use in common code, the
-Werror=vla flag was removed from the MSVC compat flags. But now we're
using C++11 / C11 static asserts instead, so we can add it back again.
This should help us noticing some breakages before they happen.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index fe6b0c63abb..209b36c2717 100644
--- a/meson.build
+++ b/meson.build
@@ -1240,7 +1240,7 @@ else
# Check for C and C++ arguments for MSVC compatibility. These are only used
# in parts of the mesa code base that need to compile with MSVC, mainly
# common code
- _trial_msvc = ['-Werror=pointer-arith', '-Werror=gnu-empty-initializer']
+ _trial_msvc = ['-Werror=pointer-arith', '-Werror=vla', '-Werror=gnu-empty-initializer']
c_msvc_compat_args += cc.get_supported_arguments(_trial_msvc)
cpp_msvc_compat_args += cpp.get_supported_arguments(_trial_msvc)
endif
More information about the mesa-commit
mailing list