From fe973d9fc45581f20fefc41fc0b8eb0066c0129d Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Wed, 2 Dec 2020 16:02:03 -0800 Subject: use OptionKey for compiler_options --- mesonbuild/compilers/vala.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesonbuild/compilers/vala.py') diff --git a/mesonbuild/compilers/vala.py b/mesonbuild/compilers/vala.py index af800c2..14971d4 100644 --- a/mesonbuild/compilers/vala.py +++ b/mesonbuild/compilers/vala.py @@ -92,7 +92,7 @@ class ValaCompiler(Compiler): def sanity_check(self, work_dir: str, environment: 'Environment') -> None: code = 'class MesonSanityCheck : Object { }' - extra_flags = [] + extra_flags: T.List[str] = [] extra_flags += environment.coredata.get_external_args(self.for_machine, self.language) if self.is_cross: extra_flags += self.get_compile_only_args() @@ -116,7 +116,7 @@ class ValaCompiler(Compiler): # no extra dirs are specified. if not extra_dirs: code = 'class MesonFindLibrary : Object { }' - args = [] + args: T.List[str] = [] args += env.coredata.get_external_args(self.for_machine, self.language) vapi_args = ['--pkg', libname] args += vapi_args -- cgit v1.1 From 71db6b04a31707674ad776be1cf22f667056d56b Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Fri, 4 Dec 2020 16:09:10 -0800 Subject: use OptionKey for builtin and base options I would have prefered to do these seperatately, but they are combined in some cases, so it was much easier to convert them together. this eliminates the builtins_per_machine dict, as it's duplicated with the OptionKey's machine parameter. --- mesonbuild/compilers/vala.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesonbuild/compilers/vala.py') diff --git a/mesonbuild/compilers/vala.py b/mesonbuild/compilers/vala.py index 14971d4..80e91f6 100644 --- a/mesonbuild/compilers/vala.py +++ b/mesonbuild/compilers/vala.py @@ -16,7 +16,7 @@ import os.path import typing as T from .. import mlog -from ..mesonlib import EnvironmentException, MachineChoice, version_compare +from ..mesonlib import EnvironmentException, MachineChoice, version_compare, OptionKey from .compilers import Compiler, LibType @@ -33,7 +33,7 @@ class ValaCompiler(Compiler): super().__init__(exelist, version, for_machine, info, is_cross=is_cross) self.version = version self.id = 'valac' - self.base_options = ['b_colorout'] + self.base_options = {OptionKey('b_colorout')} def needs_static_linker(self) -> bool: return False # Because compiles into C. -- cgit v1.1