aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/compilers.py6
-rwxr-xr-xtest cases/common/103 manygen/subdir/manygen.py3
2 files changed, 8 insertions, 1 deletions
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py
index 4088adc..5d3dc99 100644
--- a/mesonbuild/compilers.py
+++ b/mesonbuild/compilers.py
@@ -2126,6 +2126,9 @@ class ClangCCompiler(CCompiler):
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 @@ class ClangCPPCompiler(CPPCompiler):
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 c233ae6..4fd2f25 100755
--- a/test cases/common/103 manygen/subdir/manygen.py
+++ b/test cases/common/103 manygen/subdir/manygen.py
@@ -22,7 +22,8 @@ if not compiler:
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'