~mmach/netext73/meson

« back to all changes in this revision

Viewing changes to mesonbuild/compilers/vala.py

  • Committer: mmach
  • Date: 2021-02-15 11:29:44 UTC
  • Revision ID: netbit73@gmail.com-20210215112944-fpso7tr2yog0tam1
57

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
import typing as T
17
17
 
18
18
from .. import mlog
19
 
from ..mesonlib import EnvironmentException, MachineChoice, version_compare
 
19
from ..mesonlib import EnvironmentException, MachineChoice, version_compare, OptionKey
20
20
 
21
21
from .compilers import Compiler, LibType
22
22
 
33
33
        super().__init__(exelist, version, for_machine, info, is_cross=is_cross)
34
34
        self.version = version
35
35
        self.id = 'valac'
36
 
        self.base_options = ['b_colorout']
 
36
        self.base_options = {OptionKey('b_colorout')}
37
37
 
38
38
    def needs_static_linker(self) -> bool:
39
39
        return False # Because compiles into C.
92
92
 
93
93
    def sanity_check(self, work_dir: str, environment: 'Environment') -> None:
94
94
        code = 'class MesonSanityCheck : Object { }'
95
 
        extra_flags = []
 
95
        extra_flags: T.List[str] = []
96
96
        extra_flags += environment.coredata.get_external_args(self.for_machine, self.language)
97
97
        if self.is_cross:
98
98
            extra_flags += self.get_compile_only_args()
116
116
        # no extra dirs are specified.
117
117
        if not extra_dirs:
118
118
            code = 'class MesonFindLibrary : Object { }'
119
 
            args = []
 
119
            args: T.List[str] = []
120
120
            args += env.coredata.get_external_args(self.for_machine, self.language)
121
121
            vapi_args = ['--pkg', libname]
122
122
            args += vapi_args