diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2021-01-04 23:42:50 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-04 23:42:50 +0000 |
commit | d47a5c81a9af992eca42d857477f2bb5821712b6 (patch) | |
tree | 9c9ff772c696661a1582dc81c86273e8d975a13f /mesonbuild/compilers/d.py | |
parent | 6b515c432109cf7ab488da37cddeb1752e91fa5c (diff) | |
parent | f14bf8b2ed052f68857ed3eaec08a326d335a3a4 (diff) | |
download | meson-d47a5c81a9af992eca42d857477f2bb5821712b6.zip meson-d47a5c81a9af992eca42d857477f2bb5821712b6.tar.gz meson-d47a5c81a9af992eca42d857477f2bb5821712b6.tar.bz2 |
Merge pull request #8080 from dcbaker/submit/option-key-type
Use an object for option keys
Diffstat (limited to 'mesonbuild/compilers/d.py')
-rw-r--r-- | mesonbuild/compilers/d.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/mesonbuild/compilers/d.py b/mesonbuild/compilers/d.py index ca6de38..eac2aa7 100644 --- a/mesonbuild/compilers/d.py +++ b/mesonbuild/compilers/d.py @@ -18,7 +18,7 @@ import subprocess import typing as T from ..mesonlib import ( - EnvironmentException, MachineChoice, version_compare, + EnvironmentException, MachineChoice, version_compare, OptionKey, ) from ..arglist import CompilerArgs @@ -653,8 +653,10 @@ class GnuDCompiler(GnuCompiler, DCompiler): '1': default_warn_args, '2': default_warn_args + ['-Wextra'], '3': default_warn_args + ['-Wextra', '-Wpedantic']} - self.base_options = ['b_colorout', 'b_sanitize', 'b_staticpic', - 'b_vscrt', 'b_coverage', 'b_pgo', 'b_ndebug'] + self.base_options = { + OptionKey(o) for o in [ + 'b_colorout', 'b_sanitize', 'b_staticpic', 'b_vscrt', + 'b_coverage', 'b_pgo', 'b_ndebug']} self._has_color_support = version_compare(self.version, '>=4.9') # dependencies were implemented before, but broken - support was fixed in GCC 7.1+ @@ -724,7 +726,7 @@ class LLVMDCompiler(DmdLikeCompilerMixin, DCompiler): full_version=full_version, is_cross=is_cross) DmdLikeCompilerMixin.__init__(self, dmd_frontend_version=find_ldc_dmd_frontend_version(version_output)) self.id = 'llvm' - self.base_options = ['b_coverage', 'b_colorout', 'b_vscrt', 'b_ndebug'] + self.base_options = {OptionKey(o) for o in ['b_coverage', 'b_colorout', 'b_vscrt', 'b_ndebug']} def get_colorout_args(self, colortype: str) -> T.List[str]: if colortype == 'always': @@ -782,7 +784,7 @@ class DmdDCompiler(DmdLikeCompilerMixin, DCompiler): full_version=full_version, is_cross=is_cross) DmdLikeCompilerMixin.__init__(self, version) self.id = 'dmd' - self.base_options = ['b_coverage', 'b_colorout', 'b_vscrt', 'b_ndebug'] + self.base_options = {OptionKey(o) for o in ['b_coverage', 'b_colorout', 'b_vscrt', 'b_ndebug']} def get_colorout_args(self, colortype: str) -> T.List[str]: if colortype == 'always': |