aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/cuda.py
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2021-10-12 21:45:24 -0400
committerXavier Claessens <xclaesse@gmail.com>2022-03-22 17:20:48 -0400
commit06d12064d0ccb1477fadf1d62492a493fb2fb947 (patch)
treea405725996ecfcad94fdd242ebc6da7b246497ae /mesonbuild/compilers/cuda.py
parent86aaac8e4229608b25508027267f49624a9a8cb5 (diff)
downloadmeson-06d12064d0ccb1477fadf1d62492a493fb2fb947.zip
meson-06d12064d0ccb1477fadf1d62492a493fb2fb947.tar.gz
meson-06d12064d0ccb1477fadf1d62492a493fb2fb947.tar.bz2
OptionOverrideProxy: Make it immutable to avoid copies
It is always used as an immutable view so there is no point in doing copies. However, mypy insist it must implement the same APIs as Dict[OptionKey, UserOption[Any]] so keep faking it.
Diffstat (limited to 'mesonbuild/compilers/cuda.py')
-rw-r--r--mesonbuild/compilers/cuda.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/compilers/cuda.py b/mesonbuild/compilers/cuda.py
index fc9d52a..78a58c7 100644
--- a/mesonbuild/compilers/cuda.py
+++ b/mesonbuild/compilers/cuda.py
@@ -28,7 +28,7 @@ from .compilers import (Compiler, cuda_buildtype_args, cuda_optimization_args,
if T.TYPE_CHECKING:
from ..build import BuildTarget
- from ..coredata import KeyedOptionDictType
+ from ..coredata import MutableKeyedOptionDictType, KeyedOptionDictType
from ..dependencies import Dependency
from ..environment import Environment # noqa: F401
from ..envconfig import MachineInfo
@@ -612,7 +612,7 @@ class CudaCompiler(Compiler):
}}'''
return self.compiles(t.format_map(fargs), env, extra_args=extra_args, dependencies=dependencies)
- def get_options(self) -> 'KeyedOptionDictType':
+ def get_options(self) -> 'MutableKeyedOptionDictType':
opts = super().get_options()
std_key = OptionKey('std', machine=self.for_machine, lang=self.language)
ccbindir_key = OptionKey('ccbindir', machine=self.for_machine, lang=self.language)