aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/compilers.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r--mesonbuild/compilers/compilers.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index 1e386bb..4a1fd98 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -25,6 +25,7 @@ from ..mesonlib import (
from ..arglist import CompilerArgs
if T.TYPE_CHECKING:
+ from typing import Any
from ..build import BuildTarget, DFeatures
from ..coredata import MutableKeyedOptionDictType, KeyedOptionDictType
from ..envconfig import MachineInfo
@@ -247,7 +248,7 @@ BASE_OPTIONS: T.Mapping[OptionKey, BaseOption] = {
choices=MSCRT_VALS + ['from_buildtype', 'static_from_buildtype']),
}
-base_options: KeyedOptionDictType = {key: base_opt.init_option(key) for key, base_opt in BASE_OPTIONS.items()}
+base_options = {key: base_opt.init_option(key) for key, base_opt in BASE_OPTIONS.items()}
def option_enabled(boptions: T.Set[OptionKey], options: 'KeyedOptionDictType',
option: OptionKey) -> bool:
@@ -1357,7 +1358,7 @@ class Compiler(HoldableObject, metaclass=abc.ABCMeta):
def get_global_options(lang: str,
comp: T.Type[Compiler],
for_machine: MachineChoice,
- env: 'Environment') -> 'KeyedOptionDictType':
+ env: 'Environment') -> 'dict[OptionKey, options.UserOption[Any]]':
"""Retrieve options that apply to all compilers for a given language."""
description = f'Extra arguments passed to the {lang}'
argkey = OptionKey('args', lang=lang, machine=for_machine)
@@ -1387,6 +1388,6 @@ def get_global_options(lang: str,
# autotools compatibility.
largs.extend_value(comp_options)
- opts: 'KeyedOptionDictType' = {argkey: cargs, largkey: largs}
+ opts: 'dict[OptionKey, options.UserOption[Any]]' = {argkey: cargs, largkey: largs}
return opts