Lines Matching refs:coverage
27 type coverage struct {
30 // Whether binaries containing this module need --coverage added to their ldflags
34 func (cov *coverage) props() []interface{} {
38 func (cov *coverage) begin(ctx BaseModuleContext) {}
40 func (cov *coverage) deps(ctx BaseModuleContext, deps Deps) Deps {
44 func (cov *coverage) flags(ctx ModuleContext, flags Flags) Flags {
50 flags.Coverage = true
51 flags.GlobalFlags = append(flags.GlobalFlags, "--coverage", "-O0")
55 // Even if we don't have coverage enabled, if any of our object files were compiled
56 // with coverage, then we need to add --coverage to our ldflags.
61 // those have coverage enabled.
63 if cc, ok := m.(*Module); ok && cc.coverage != nil {
64 if cc.coverage.linkCoverage {
74 if !ok || cc.coverage == nil {
82 if cc.coverage.linkCoverage {
90 flags.LdFlags = append(flags.LdFlags, "--coverage")
97 if c, ok := mctx.Module().(*Module); ok && c.coverage != nil {
101 // Coverage is disabled globally
105 } else if c.coverage.Properties.Native_coverage != nil {
106 enabled = *c.coverage.Properties.Native_coverage
113 // when turning on or off coverage. We'll still relink the necessary
116 m[0].(*Module).coverage.Properties.CoverageEnabled = true