diff options
Diffstat (limited to 'mesonbuild/compilers/cpp.py')
-rw-r--r-- | mesonbuild/compilers/cpp.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index e6410c8..fe09b6b 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -41,7 +41,7 @@ from .mixins.pgi import PGICompiler from .mixins.emscripten import EmscriptenMixin if T.TYPE_CHECKING: - from ..coredata import KeyedOptionDictType + from ..coredata import MutableKeyedOptionDictType, KeyedOptionDictType from ..dependencies import Dependency from ..envconfig import MachineInfo from ..environment import Environment @@ -168,7 +168,7 @@ class CPPCompiler(CLikeCompiler, Compiler): raise MesonException(f'C++ Compiler does not support -std={cpp_std}') - def get_options(self) -> 'KeyedOptionDictType': + def get_options(self) -> 'MutableKeyedOptionDictType': opts = super().get_options() key = OptionKey('std', machine=self.for_machine, lang=self.language) opts.update({ @@ -196,7 +196,7 @@ class ClangCPPCompiler(ClangCompiler, CPPCompiler): '2': default_warn_args + ['-Wextra'], '3': default_warn_args + ['-Wextra', '-Wpedantic']} - def get_options(self) -> 'KeyedOptionDictType': + def get_options(self) -> 'MutableKeyedOptionDictType': opts = CPPCompiler.get_options(self) key = OptionKey('key', machine=self.for_machine, lang=self.language) opts.update({ @@ -316,7 +316,7 @@ class ArmclangCPPCompiler(ArmclangCompiler, CPPCompiler): '2': default_warn_args + ['-Wextra'], '3': default_warn_args + ['-Wextra', '-Wpedantic']} - def get_options(self) -> 'KeyedOptionDictType': + def get_options(self) -> 'MutableKeyedOptionDictType': opts = CPPCompiler.get_options(self) key = OptionKey('std', machine=self.for_machine, lang=self.language) opts.update({ @@ -362,7 +362,7 @@ class GnuCPPCompiler(GnuCompiler, CPPCompiler): '2': default_warn_args + ['-Wextra'], '3': default_warn_args + ['-Wextra', '-Wpedantic']} - def get_options(self) -> 'KeyedOptionDictType': + def get_options(self) -> 'MutableKeyedOptionDictType': key = OptionKey('std', machine=self.for_machine, lang=self.language) opts = CPPCompiler.get_options(self) opts.update({ @@ -465,7 +465,7 @@ class ElbrusCPPCompiler(ElbrusCompiler, CPPCompiler): info, exe_wrapper, linker=linker, full_version=full_version) ElbrusCompiler.__init__(self) - def get_options(self) -> 'KeyedOptionDictType': + def get_options(self) -> 'MutableKeyedOptionDictType': opts = CPPCompiler.get_options(self) cpp_stds = ['none', 'c++98', 'gnu++98'] @@ -542,7 +542,7 @@ class IntelCPPCompiler(IntelGnuLikeCompiler, CPPCompiler): '2': default_warn_args + ['-Wextra'], '3': default_warn_args + ['-Wextra']} - def get_options(self) -> 'KeyedOptionDictType': + def get_options(self) -> 'MutableKeyedOptionDictType': opts = CPPCompiler.get_options(self) # Every Unix compiler under the sun seems to accept -std=c++03, # with the exception of ICC. Instead of preventing the user from @@ -618,7 +618,7 @@ class VisualStudioLikeCPPCompilerMixin(CompilerMixinBase): key = OptionKey('winlibs', machine=self.for_machine, lang=self.language) return T.cast('T.List[str]', options[key].value[:]) - def _get_options_impl(self, opts: 'KeyedOptionDictType', cpp_stds: T.List[str]) -> 'KeyedOptionDictType': + def _get_options_impl(self, opts: 'MutableKeyedOptionDictType', cpp_stds: T.List[str]) -> 'MutableKeyedOptionDictType': key = OptionKey('std', machine=self.for_machine, lang=self.language) opts.update({ key.evolve('eh'): coredata.UserComboOption( @@ -705,7 +705,7 @@ class VisualStudioCPPCompiler(CPP11AsCPP14Mixin, VisualStudioLikeCPPCompilerMixi info, exe_wrapper, linker=linker, full_version=full_version) MSVCCompiler.__init__(self, target) - def get_options(self) -> 'KeyedOptionDictType': + def get_options(self) -> 'MutableKeyedOptionDictType': cpp_stds = ['none', 'c++11', 'vc++11'] # Visual Studio 2015 and later if version_compare(self.version, '>=19'): @@ -747,7 +747,7 @@ class ClangClCPPCompiler(CPP11AsCPP14Mixin, VisualStudioLikeCPPCompilerMixin, Cl info, exe_wrapper, linker=linker, full_version=full_version) ClangClCompiler.__init__(self, target) - def get_options(self) -> 'KeyedOptionDictType': + def get_options(self) -> 'MutableKeyedOptionDictType': cpp_stds = ['none', 'c++11', 'vc++11', 'c++14', 'vc++14', 'c++17', 'vc++17', 'c++latest'] return self._get_options_impl(super().get_options(), cpp_stds) @@ -763,7 +763,7 @@ class IntelClCPPCompiler(VisualStudioLikeCPPCompilerMixin, IntelVisualStudioLike info, exe_wrapper, linker=linker, full_version=full_version) IntelVisualStudioLikeCompiler.__init__(self, target) - def get_options(self) -> 'KeyedOptionDictType': + def get_options(self) -> 'MutableKeyedOptionDictType': # This has only been tested with version 19.0, cpp_stds = ['none', 'c++11', 'vc++11', 'c++14', 'vc++14', 'c++17', 'vc++17', 'c++latest'] return self._get_options_impl(super().get_options(), cpp_stds) @@ -782,7 +782,7 @@ class ArmCPPCompiler(ArmCompiler, CPPCompiler): info, exe_wrapper, linker=linker, full_version=full_version) ArmCompiler.__init__(self) - def get_options(self) -> 'KeyedOptionDictType': + def get_options(self) -> 'MutableKeyedOptionDictType': opts = CPPCompiler.get_options(self) key = OptionKey('std', machine=self.for_machine, lang=self.language) opts[key].choices = ['none', 'c++03', 'c++11'] @@ -842,7 +842,7 @@ class TICPPCompiler(TICompiler, CPPCompiler): info, exe_wrapper, linker=linker, full_version=full_version) TICompiler.__init__(self) - def get_options(self) -> 'KeyedOptionDictType': + def get_options(self) -> 'MutableKeyedOptionDictType': opts = CPPCompiler.get_options(self) key = OptionKey('std', machine=self.for_machine, lang=self.language) opts[key].choices = ['none', 'c++03'] |