diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2023-07-17 00:29:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-17 00:29:37 +0300 |
commit | 0dba7340ecfbe84231a14559ef7f9e7dfb7d1299 (patch) | |
tree | ade6d93a8c93bfbfe9df8de6796c93588e3fe080 /mesonbuild/compilers/asm.py | |
parent | b60ea0851b1dfe4400dc2d12b127300b1da41105 (diff) | |
parent | 9b86c67e19b91eee065c1e3706ad5521801022da (diff) | |
download | meson-0dba7340ecfbe84231a14559ef7f9e7dfb7d1299.zip meson-0dba7340ecfbe84231a14559ef7f9e7dfb7d1299.tar.gz meson-0dba7340ecfbe84231a14559ef7f9e7dfb7d1299.tar.bz2 |
Merge pull request #11976 from tristan957/cleanups
Some various type related cleanups
Diffstat (limited to 'mesonbuild/compilers/asm.py')
-rw-r--r-- | mesonbuild/compilers/asm.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/mesonbuild/compilers/asm.py b/mesonbuild/compilers/asm.py index e34b4a6..f25473b 100644 --- a/mesonbuild/compilers/asm.py +++ b/mesonbuild/compilers/asm.py @@ -11,7 +11,7 @@ if T.TYPE_CHECKING: from ..mesonlib import MachineChoice from ..envconfig import MachineInfo -nasm_optimization_args = { +nasm_optimization_args: T.Dict[str, T.List[str]] = { 'plain': [], '0': ['-O0'], 'g': ['-O0'], @@ -19,7 +19,7 @@ nasm_optimization_args = { '2': ['-Ox'], '3': ['-Ox'], 's': ['-Ox'], -} # type: T.Dict[str, T.List[str]] +} class NasmCompiler(Compiler): @@ -69,7 +69,7 @@ class NasmCompiler(Compiler): return ['-o', outputname] def unix_args_to_native(self, args: T.List[str]) -> T.List[str]: - outargs = [] + outargs: T.List[str] = [] for arg in args: if arg == '-pthread': continue @@ -295,7 +295,12 @@ class MetrowerksAsmCompiler(MetrowerksCompiler, Compiler): Compiler.__init__(self, ccache, exelist, version, for_machine, info, linker, full_version, is_cross) MetrowerksCompiler.__init__(self) - self.warn_args = {'0': [], '1': [], '2': [], '3': [], 'everything': []} # type: T.Dict[str, T.List[str]] + self.warn_args: T.Dict[str, T.List[str]] = { + '0': [], + '1': [], + '2': [], + '3': [], + 'everything': []} self.can_compile_suffixes.add('s') def get_crt_compile_args(self, crt_val: str, buildtype: str) -> T.List[str]: |