diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py index 4088adc1c955..5d3dc99cba6f 100644 --- a/mesonbuild/compilers.py +++ b/mesonbuild/compilers.py @@ -2126,6 +2126,9 @@ def get_option_compile_args(self, options): def get_option_link_args(self, options): return [] + def has_argument(self, arg, env): + return super().has_argument(['-Werror=unknown-warning-option', arg], env) + class GnuCPPCompiler(CPPCompiler): # may need to separate the latter to extra_debug_args or something std_debug_args = ['-g'] @@ -2240,6 +2243,9 @@ def get_option_compile_args(self, options): def get_option_link_args(self, options): return [] + def has_argument(self, arg, env): + return super().has_argument(['-Werror=unknown-warning-option', arg], env) + class FortranCompiler(Compiler): def __init__(self, exelist, version, is_cross, exe_wrapper=None): super().__init__(exelist, version) diff --git a/test cases/common/103 manygen/subdir/manygen.py b/test cases/common/103 manygen/subdir/manygen.py index c233ae6bc0a4..4fd2f252eac2 100755 --- a/test cases/common/103 manygen/subdir/manygen.py +++ b/test cases/common/103 manygen/subdir/manygen.py @@ -22,7 +22,8 @@ shutil.which('clang') or \ shutil.which('cc') -if 'cl' in os.path.basename(compiler): +compbase = os.path.basename(compiler) +if 'cl' in compbase and 'clang' not in compbase: libsuffix = '.lib' is_vs = True compiler = 'cl'