aboutsummaryrefslogtreecommitdiffstats
path: root/cc/cc.go
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2019-08-09 14:44:36 +0900
committerJiyong Park <jiyong@google.com>2019-08-16 00:01:18 +0900
commit49932f3e6975f5a39d8f9f5b064431d105740ada (patch)
treeff6e1a682bd4c163d2811660a474d3c0bf701529 /cc/cc.go
parent1bc40c56b9f9f02191d14bf9812101e0ae55bb2f (diff)
downloadbuild_soong-49932f3e6975f5a39d8f9f5b064431d105740ada.tar.gz
build_soong-49932f3e6975f5a39d8f9f5b064431d105740ada.tar.bz2
build_soong-49932f3e6975f5a39d8f9f5b064431d105740ada.zip
Build native coverage variant of APEXes when needed
When the native coverage is enabled, APEXes (and files there) are built for native coverage as well. Bug: 138952487 Test: make -j NATIVE_COVERAGE=true COVERAGE_PATHS='*' com.android.resolv find out -name "*.gcno" | grep DnsResolver shows files Test: libnetd_resolv.zip is found under $(TARGET_OUT)/apex/com.android.resolv/lib directory Merged-In: I97bcee9bf8ffc0dc71453abbdb613ed56ea2cdb4 (cherry picked from commit ee9a98d88ec9a792c3d67b9aed9e4571bf2544cf) Change-Id: I97bcee9bf8ffc0dc71453abbdb613ed56ea2cdb4
Diffstat (limited to 'cc/cc.go')
-rw-r--r--cc/cc.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/cc/cc.go b/cc/cc.go
index 0668fd9a..89beee49 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -311,6 +311,7 @@ type linker interface {
unstrippedOutputFilePath() android.Path
nativeCoverage() bool
+ coverageOutputFilePath() android.OptionalPath
}
type installer interface {
@@ -419,6 +420,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()