aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-10-07 18:53:59 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2016-10-14 19:13:21 +0530
commit4332df01b86d5648c83498561572161d1f50e4cd (patch)
treee303c5c08f90cc074b626cc84d9dba236234bdf1 /mesonbuild/backend/backends.py
parentb6b8d561b84eb950d1503e682ca2eab3b656efa9 (diff)
downloadmeson-4332df01b86d5648c83498561572161d1f50e4cd.zip
meson-4332df01b86d5648c83498561572161d1f50e4cd.tar.gz
meson-4332df01b86d5648c83498561572161d1f50e4cd.tar.bz2
Add no-warning args while building Vala C code
This is done by adding a new compiler method called 'no_warn_args' which returns the argument(s) required for the compiler to emit no warnings for that compilation. This take care of not disabling warnings for C code compiled into the BuildTarget. Also includes tests for ensuring all this. https://github.com/mesonbuild/meson/issues/864
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r--mesonbuild/backend/backends.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 16f7ada..1d3fddd 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -327,11 +327,14 @@ class Backend():
extra_args.append(arg)
return extra_args
- def generate_basic_compiler_args(self, target, compiler):
+ def generate_basic_compiler_args(self, target, compiler, no_warn_args=False):
commands = []
commands += self.get_cross_stdlib_args(target, compiler)
commands += compiler.get_always_args()
- commands += compiler.get_warn_args(self.environment.coredata.get_builtin_option('warning_level'))
+ if no_warn_args:
+ commands += compiler.get_no_warn_args()
+ else:
+ commands += compiler.get_warn_args(self.environment.coredata.get_builtin_option('warning_level'))
commands += compiler.get_option_compile_args(self.environment.coredata.compiler_options)
commands += self.build.get_global_args(compiler)
commands += self.environment.coredata.external_args[compiler.get_language()]