compilers: Move things out of clike

One method belongs in the base Compiler class, the other belongs in
the GnuLikeCompiler class.
pull/6943/head
Dylan Baker 5 years ago
parent a33f20b9a4
commit b5e077fce8
  1. 3
      mesonbuild/compilers/compilers.py
  2. 6
      mesonbuild/compilers/mixins/clike.py
  3. 3
      mesonbuild/compilers/mixins/gnu.py

@ -1201,6 +1201,9 @@ class Compiler:
""" """
return [] return []
def get_coverage_link_args(self) -> T.List[str]:
return self.linker.get_coverage_args()
def get_largefile_args(compiler): def get_largefile_args(compiler):
''' '''

@ -114,12 +114,6 @@ class CLikeCompiler:
def get_output_args(self, target): def get_output_args(self, target):
return ['-o', target] return ['-o', target]
def get_coverage_args(self):
return ['--coverage']
def get_coverage_link_args(self) -> T.List[str]:
return self.linker.get_coverage_args()
def get_werror_args(self): def get_werror_args(self):
return ['-Werror'] return ['-Werror']

@ -312,6 +312,9 @@ class GnuLikeCompiler(metaclass=abc.ABCMeta):
'not {}.'.format(linker)) 'not {}.'.format(linker))
return ['-fuse-ld={}'.format(linker)] return ['-fuse-ld={}'.format(linker)]
def get_coverage_args(self) -> T.List[str]:
return ['--coverage']
class GnuCompiler(GnuLikeCompiler): class GnuCompiler(GnuLikeCompiler):
""" """

Loading…
Cancel
Save