aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/cs.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2022-01-10 09:54:46 -0800
committerEli Schwartz <eschwartz93@gmail.com>2022-01-10 15:53:26 -0500
commit1209b8820bad58fd3865069b63f3a1125d9824bc (patch)
tree95b8e6d0e706d377b8cfbf46f44a503097386e85 /mesonbuild/compilers/cs.py
parentf67994476da4bdc5389c558989809df48a172c6e (diff)
downloadmeson-1209b8820bad58fd3865069b63f3a1125d9824bc.zip
meson-1209b8820bad58fd3865069b63f3a1125d9824bc.tar.gz
meson-1209b8820bad58fd3865069b63f3a1125d9824bc.tar.bz2
compilers: push the compiler id to a class variable
It really is a per class value, and shouldn't be set per instance. It also allows us to get rid of useless constructors, including those breaking mypy
Diffstat (limited to 'mesonbuild/compilers/cs.py')
-rw-r--r--mesonbuild/compilers/cs.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/mesonbuild/compilers/cs.py b/mesonbuild/compilers/cs.py
index 7ebb66d..b38f626 100644
--- a/mesonbuild/compilers/cs.py
+++ b/mesonbuild/compilers/cs.py
@@ -40,9 +40,8 @@ class CsCompiler(BasicLinkerIsCompilerMixin, Compiler):
language = 'cs'
def __init__(self, exelist: T.List[str], version: str, for_machine: MachineChoice,
- info: 'MachineInfo', comp_id: str, runner: T.Optional[str] = None):
+ info: 'MachineInfo', runner: T.Optional[str] = None):
super().__init__(exelist, version, for_machine, info)
- self.id = comp_id
self.runner = runner
@classmethod
@@ -121,19 +120,20 @@ class CsCompiler(BasicLinkerIsCompilerMixin, Compiler):
class MonoCompiler(CsCompiler):
+
+ id = 'mono'
+
def __init__(self, exelist: T.List[str], version: str, for_machine: MachineChoice,
info: 'MachineInfo'):
- super().__init__(exelist, version, for_machine, info, 'mono',
- runner='mono')
+ super().__init__(exelist, version, for_machine, info, runner='mono')
def rsp_file_syntax(self) -> 'RSPFileSyntax':
return RSPFileSyntax.GCC
class VisualStudioCsCompiler(CsCompiler):
- def __init__(self, exelist: T.List[str], version: str, for_machine: MachineChoice,
- info: 'MachineInfo'):
- super().__init__(exelist, version, for_machine, info, 'csc')
+
+ id = 'csc'
def get_buildtype_args(self, buildtype: str) -> T.List[str]:
res = mono_buildtype_args[buildtype]