compilers: change get_argument_syntax to static method

This allows to get this fixed value before the class is initialized.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
pull/13526/head
Kacper Michajłow 6 months ago committed by Eli Schwartz
parent a5211a1520
commit 3702b4bdb3
  1. 3
      mesonbuild/compilers/asm.py
  2. 3
      mesonbuild/compilers/compilers.py
  3. 3
      mesonbuild/compilers/mixins/gnu.py
  4. 3
      mesonbuild/compilers/mixins/visualstudio.py

@ -158,7 +158,8 @@ class MasmCompiler(Compiler):
def get_compile_only_args(self) -> T.List[str]:
return ['/c']
def get_argument_syntax(self) -> str:
@staticmethod
def get_argument_syntax() -> str:
return 'msvc'
def needs_static_linker(self) -> bool:

@ -963,7 +963,8 @@ class Compiler(HoldableObject, metaclass=abc.ABCMeta):
def get_pie_link_args(self) -> T.List[str]:
return self.linker.get_pie_args()
def get_argument_syntax(self) -> str:
@staticmethod
def get_argument_syntax() -> str:
"""Returns the argument family type.
Compilers fall into families if they try to emulate the command line

@ -420,7 +420,8 @@ class GnuLikeCompiler(Compiler, metaclass=abc.ABCMeta):
# For other targets, discard the .def file.
return []
def get_argument_syntax(self) -> str:
@staticmethod
def get_argument_syntax() -> str:
return 'gcc'
def get_profile_generate_args(self) -> T.List[str]:

@ -362,7 +362,8 @@ class VisualStudioLikeCompiler(Compiler, metaclass=abc.ABCMeta):
# false without compiling anything
return name in {'dllimport', 'dllexport'}, False
def get_argument_syntax(self) -> str:
@staticmethod
def get_argument_syntax() -> str:
return 'msvc'
def symbols_have_underscore_prefix(self, env: 'Environment') -> bool:

Loading…
Cancel
Save