aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/c.py
diff options
context:
space:
mode:
authorjml1795 <45511331+jml1795@users.noreply.github.com>2019-02-18 17:06:27 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2019-02-19 00:06:27 +0200
commita9e63568fe4a1ef420cdb8bacb85fbf6d621dc0d (patch)
tree5b5159756428d3f403fe45d183412331d715b605 /mesonbuild/compilers/c.py
parent2cede4d6c9264f725ab57f48e929c748fa1f1ac8 (diff)
downloadmeson-a9e63568fe4a1ef420cdb8bacb85fbf6d621dc0d.zip
meson-a9e63568fe4a1ef420cdb8bacb85fbf6d621dc0d.tar.gz
meson-a9e63568fe4a1ef420cdb8bacb85fbf6d621dc0d.tar.bz2
Add warning level zero
Diffstat (limited to 'mesonbuild/compilers/c.py')
-rw-r--r--mesonbuild/compilers/c.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py
index a1a8fb9..3f3aba8 100644
--- a/mesonbuild/compilers/c.py
+++ b/mesonbuild/compilers/c.py
@@ -1152,7 +1152,7 @@ class CCompiler(Compiler):
# flags, so when we are testing a flag like "-Wno-forgotten-towel", also
# check the equivalent enable flag too "-Wforgotten-towel"
if arg.startswith('-Wno-'):
- args.append('-W' + arg[5:])
+ args.append('-W' + arg[5:])
if arg.startswith('-Wl,'):
mlog.warning('{} looks like a linker argument, '
'but has_argument and other similar methods only '
@@ -1209,7 +1209,8 @@ class ClangCCompiler(ClangCompiler, CCompiler):
CCompiler.__init__(self, exelist, version, is_cross, exe_wrapper, **kwargs)
ClangCompiler.__init__(self, compiler_type)
default_warn_args = ['-Wall', '-Winvalid-pch']
- self.warn_args = {'1': default_warn_args,
+ self.warn_args = {'0': [],
+ '1': default_warn_args,
'2': default_warn_args + ['-Wextra'],
'3': default_warn_args + ['-Wextra', '-Wpedantic']}
@@ -1243,7 +1244,8 @@ class ArmclangCCompiler(ArmclangCompiler, CCompiler):
CCompiler.__init__(self, exelist, version, is_cross, exe_wrapper, **kwargs)
ArmclangCompiler.__init__(self, compiler_type)
default_warn_args = ['-Wall', '-Winvalid-pch']
- self.warn_args = {'1': default_warn_args,
+ self.warn_args = {'0': [],
+ '1': default_warn_args,
'2': default_warn_args + ['-Wextra'],
'3': default_warn_args + ['-Wextra', '-Wpedantic']}
@@ -1271,7 +1273,8 @@ class GnuCCompiler(GnuCompiler, CCompiler):
CCompiler.__init__(self, exelist, version, is_cross, exe_wrapper, **kwargs)
GnuCompiler.__init__(self, compiler_type, defines)
default_warn_args = ['-Wall', '-Winvalid-pch']
- self.warn_args = {'1': default_warn_args,
+ self.warn_args = {'0': [],
+ '1': default_warn_args,
'2': default_warn_args + ['-Wextra'],
'3': default_warn_args + ['-Wextra', '-Wpedantic']}
@@ -1341,7 +1344,8 @@ class IntelCCompiler(IntelCompiler, CCompiler):
IntelCompiler.__init__(self, compiler_type)
self.lang_header = 'c-header'
default_warn_args = ['-Wall', '-w3', '-diag-disable:remark']
- self.warn_args = {'1': default_warn_args,
+ self.warn_args = {'0': [],
+ '1': default_warn_args,
'2': default_warn_args + ['-Wextra'],
'3': default_warn_args + ['-Wextra']}
@@ -1383,7 +1387,8 @@ class VisualStudioCCompiler(CCompiler):
# /showIncludes is needed for build dependency tracking in Ninja
# See: https://ninja-build.org/manual.html#_deps
self.always_args = ['/nologo', '/showIncludes']
- self.warn_args = {'1': ['/W2'],
+ self.warn_args = {'0': ['/W1'],
+ '1': ['/W2'],
'2': ['/W3'],
'3': ['/W4']}
self.base_options = ['b_pch', 'b_ndebug', 'b_vscrt'] # FIXME add lto, pgo and the like