From 6b7bc608b78f28c0508f6d61f3edbb958708e7d8 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sat, 16 Apr 2022 20:51:52 +0800 Subject: [PATCH] compiler.has_argument: Add `-Werror=unknown-warning-option` to clang-cl cmd line --- mesonbuild/compilers/mixins/visualstudio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/compilers/mixins/visualstudio.py b/mesonbuild/compilers/mixins/visualstudio.py index 0f2db738d..0ad4d8512 100644 --- a/mesonbuild/compilers/mixins/visualstudio.py +++ b/mesonbuild/compilers/mixins/visualstudio.py @@ -449,7 +449,7 @@ class ClangClCompiler(VisualStudioLikeCompiler): def has_arguments(self, args: T.List[str], env: 'Environment', code: str, mode: str) -> T.Tuple[bool, bool]: if mode != 'link': - args = args + ['-Werror=unknown-argument'] + args = args + ['-Werror=unknown-argument', '-Werror=unknown-warning-option'] return super().has_arguments(args, env, code, mode) def get_toolset_version(self) -> T.Optional[str]: