Put buildtype flags to vala compiles.

pull/493/merge
Jussi Pakkanen 9 years ago
parent 3415c3a693
commit 6291fb4056
  1. 5
      mesonbuild/backend/ninjabackend.py
  2. 7
      mesonbuild/compilers.py

@ -184,7 +184,9 @@ int dummy;
self.generate_tests(outfile)
outfile.write('# Install rules\n\n')
self.generate_install(outfile)
if self.environment.coredata.base_options.get('b_coverage', False):
if 'b_coverage' in self.environment.coredata.base_options and\
self.environment.coredata.base_options['b_coverage'].value:
print(bool(self.environment.coredata.base_options.get('b_coverage', False)))
outfile.write('# Coverage rules\n\n')
self.generate_coverage_rules(outfile)
outfile.write('# Suffix\n\n')
@ -813,6 +815,7 @@ int dummy;
outputs = [vapiname]
args = []
args += self.build.get_global_args(compiler)
args += compiler.get_buildtype_args(self.environment.coredata.get_builtin_option('buildtype'))
args += ['-d', self.get_target_private_dir(target)]
args += ['-C']#, '-o', cname]
if not isinstance(target, build.Executable):

@ -126,7 +126,7 @@ base_options = {
'off'),
'b_coverage': coredata.UserBooleanOption('b_coverage',
'Enable coverage tracking.',
True),
False),
}
def sanitizer_compile_args(value):
@ -1044,6 +1044,11 @@ class ValaCompiler(Compiler):
suffix = filename.split('.')[-1]
return suffix in ('vala', 'vapi')
def get_buildtype_args(self, buildtype):
if buildtype == 'debug' or buildtype == 'debugoptimized':
return ['--debug']
return []
class RustCompiler(Compiler):
def __init__(self, exelist, version):
super().__init__(exelist, version)

Loading…
Cancel
Save