aboutsummaryrefslogtreecommitdiffstats
path: root/cc/cc.go
diff options
context:
space:
mode:
Diffstat (limited to 'cc/cc.go')
-rw-r--r--cc/cc.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/cc/cc.go b/cc/cc.go
index ebe6b395..49dce18f 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -314,6 +314,7 @@ type linker interface {
unstrippedOutputFilePath() android.Path
nativeCoverage() bool
+ coverageOutputFilePath() android.OptionalPath
}
type installer interface {
@@ -360,6 +361,7 @@ var (
ndkLateStubDepTag = dependencyTag{name: "ndk late stub", library: true}
vndkExtDepTag = dependencyTag{name: "vndk extends", library: true}
runtimeDepTag = dependencyTag{name: "runtime lib"}
+ coverageDepTag = dependencyTag{name: "coverage"}
)
// Module contains the properties and members used by all C/C++ module types, and implements
@@ -422,6 +424,13 @@ func (c *Module) UnstrippedOutputFile() android.Path {
return nil
}
+func (c *Module) CoverageOutputFile() android.OptionalPath {
+ if c.linker != nil {
+ return c.linker.coverageOutputFilePath()
+ }
+ return android.OptionalPath{}
+}
+
func (c *Module) RelativeInstallPath() string {
if c.installer != nil {
return c.installer.relativeInstallPath()
@@ -955,7 +964,7 @@ func (c *Module) GenerateAndroidBuildActions(actx android.ModuleContext) {
flags = c.sanitize.flags(ctx, flags)
}
if c.coverage != nil {
- flags = c.coverage.flags(ctx, flags)
+ flags, deps = c.coverage.flags(ctx, flags, deps)
}
if c.lto != nil {
flags = c.lto.flags(ctx, flags)