compilers: Move things out of clike

One method belongs in the base Compiler class, the other belongs in
the GnuLikeCompiler class.
This commit is contained in:
Dylan Baker 2020-04-10 12:33:34 -07:00
parent a33f20b9a4
commit b5e077fce8
3 changed files with 6 additions and 6 deletions

View File

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

View File

@ -114,12 +114,6 @@ class CLikeCompiler:
def get_output_args(self, 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):
return ['-Werror']

View File

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