compilers/d: Implement coverage for GDC

Since GDC a GNU compiler, we just need to pass the normal GNU options
and coverage is generated.

Related: ##5669
This commit is contained in:
Dylan Baker 2020-04-10 12:35:25 -07:00
parent b5e077fce8
commit 0f8d73848a
1 changed files with 1 additions and 4 deletions

View File

@ -642,7 +642,7 @@ class GnuDCompiler(GnuCompiler, DCompiler):
'1': default_warn_args,
'2': default_warn_args + ['-Wextra'],
'3': default_warn_args + ['-Wextra', '-Wpedantic']}
self.base_options = ['b_colorout', 'b_sanitize', 'b_staticpic', 'b_vscrt']
self.base_options = ['b_colorout', 'b_sanitize', 'b_staticpic', 'b_vscrt', 'b_coverage']
self._has_color_support = version_compare(self.version, '>=4.9')
# dependencies were implemented before, but broken - support was fixed in GCC 7.1+
@ -662,9 +662,6 @@ class GnuDCompiler(GnuCompiler, DCompiler):
def get_warn_args(self, level):
return self.warn_args[level]
def get_coverage_args(self):
return []
def get_buildtype_args(self, buildtype):
return d_gdc_buildtype_args[buildtype]