diff options
author | Matthias Klumpp <matthias@tenstral.net> | 2016-08-22 21:09:27 +0200 |
---|---|---|
committer | Matthias Klumpp <matthias@tenstral.net> | 2016-08-22 21:09:27 +0200 |
commit | d98959f2cbed3642eda272e0e54686d790847c5d (patch) | |
tree | 0c9b52e9168b153dfc0a72262596a5bba21118cf /mesonbuild/compilers.py | |
parent | 76fe77f9a85c822d2ec257ad60685ec2372189ea (diff) | |
download | meson-d98959f2cbed3642eda272e0e54686d790847c5d.zip meson-d98959f2cbed3642eda272e0e54686d790847c5d.tar.gz meson-d98959f2cbed3642eda272e0e54686d790847c5d.tar.bz2 |
Make D compilers return colored output by default
Diffstat (limited to 'mesonbuild/compilers.py')
-rw-r--r-- | mesonbuild/compilers.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py index 40866df..58444bb 100644 --- a/mesonbuild/compilers.py +++ b/mesonbuild/compilers.py @@ -1557,6 +1557,12 @@ class GnuDCompiler(DCompiler): self.warn_args = {'1': ['-Wall', '-Wdeprecated'], '2': ['-Wall', '-Wextra', '-Wdeprecated'], '3': ['-Wall', '-Wextra', '-Wdeprecated', '-Wpedantic']} + self.base_options = ['b_colorout', 'b_sanitize'] + + def get_colorout_args(self, colortype): + if mesonlib.version_compare(self.version, '>=4.9.0'): + return gnu_color_args[colortype][:] + return [] def get_dependency_gen_args(self, outtarget, outfile): # FIXME: Passing -fmake-deps results in a file-not-found message. @@ -1597,6 +1603,12 @@ class LLVMDCompiler(DCompiler): def __init__(self, exelist, version, is_cross): DCompiler.__init__(self, exelist, version, is_cross) self.id = 'llvm' + self.base_options = ['b_coverage', 'b_colorout'] + + def get_colorout_args(self, colortype): + if colortype == 'always': + return ['-enable-color'] + return [] def get_dependency_gen_args(self, outtarget, outfile): # LDC using the -deps flag returns a non-Makefile dependency-info file, which @@ -1646,6 +1658,12 @@ class DmdDCompiler(DCompiler): def __init__(self, exelist, version, is_cross): DCompiler.__init__(self, exelist, version, is_cross) self.id = 'dmd' + self.base_options = ['b_coverage', 'b_colorout'] + + def get_colorout_args(self, colortype): + if colortype == 'always': + return ['-color=on'] + return [] def get_dependency_gen_args(self, outtarget, outfile): # LDC using the -deps flag returns a non-Makefile dependency-info file, which |