diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2025-02-26 10:52:39 -0800 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2025-02-27 23:33:39 +0200 |
| commit | 3f430886dc29f2f80ca1556b9e0518f2a182f988 (patch) | |
| tree | aa57d40231107983cae215f4f71cd6496196c840 /mesonbuild/compilers | |
| parent | d9f3f6c0b27476edc84ccddecb373af88fde1053 (diff) | |
| download | meson-3f430886dc29f2f80ca1556b9e0518f2a182f988.tar.gz | |
coredata: delete the OptionsView
This also makes KeyedOptionDictType obsolete and it's removed
Diffstat (limited to 'mesonbuild/compilers')
| -rw-r--r-- | mesonbuild/compilers/compilers.py | 4 | ||||
| -rw-r--r-- | mesonbuild/compilers/mixins/islinker.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 7e061ba47..14f0a330d 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -26,7 +26,7 @@ from ..arglist import CompilerArgs if T.TYPE_CHECKING: from .. import coredata from ..build import BuildTarget, DFeatures - from ..coredata import MutableKeyedOptionDictType, KeyedOptionDictType + from ..coredata import MutableKeyedOptionDictType from ..envconfig import MachineInfo from ..environment import Environment from ..linkers import RSPFileSyntax @@ -272,7 +272,7 @@ def option_enabled(boptions: T.Set[OptionKey], return False -def get_option_value(options: 'KeyedOptionDictType', opt: OptionKey, fallback: '_T') -> '_T': +def get_option_value(options: options.OptionStore, opt: OptionKey, fallback: '_T') -> '_T': """Get the value of an option, or the fallback value.""" try: v: '_T' = options.get_value(opt) # type: ignore [assignment] diff --git a/mesonbuild/compilers/mixins/islinker.py b/mesonbuild/compilers/mixins/islinker.py index 6c9daf3fc..44040a7a2 100644 --- a/mesonbuild/compilers/mixins/islinker.py +++ b/mesonbuild/compilers/mixins/islinker.py @@ -16,10 +16,10 @@ import typing as T from ...mesonlib import EnvironmentException, MesonException, is_windows if T.TYPE_CHECKING: - from ...coredata import KeyedOptionDictType from ...environment import Environment from ...compilers.compilers import Compiler from ...build import BuildTarget + from ...options import OptionStore else: # This is a bit clever, for mypy we pretend that these mixins descend from # Compiler, so we get all of the methods and attributes defined for us, but @@ -71,7 +71,7 @@ class BasicLinkerIsCompilerMixin(Compiler): def get_std_shared_lib_link_args(self) -> T.List[str]: return [] - def get_std_shared_module_args(self, options: 'KeyedOptionDictType') -> T.List[str]: + def get_std_shared_module_args(self, options: OptionStore) -> T.List[str]: return self.get_std_shared_lib_link_args() def get_link_whole_for(self, args: T.List[str]) -> T.List[str]: |
