Add native_coverage to product variables
Allow native_coverage to adjust sources in product_variables.
Fixes: 148088129
Test: m checkbuild
Change-Id: I9c9d491cda92d69726a0d598408de2060241365b
diff --git a/android/config.go b/android/config.go
index 5c4f0a8..cd24b24 100644
--- a/android/config.go
+++ b/android/config.go
@@ -1024,7 +1024,7 @@
}
func (c *deviceConfig) NativeCoverageEnabled() bool {
- return Bool(c.config.productVariables.NativeCoverage)
+ return Bool(c.config.productVariables.Native_coverage)
}
func (c *deviceConfig) ClangCoverageEnabled() bool {
diff --git a/android/variable.go b/android/variable.go
index c588672..af1d9db 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -123,6 +123,11 @@
Experimental_mte struct {
Cflags []string `android:"arch_variant"`
} `android:"arch_variant"`
+
+ Native_coverage struct {
+ Srcs []string `android:"arch_variant"`
+ Exclude_srcs []string `android:"arch_variant"`
+ } `android:"arch_variant"`
} `android:"arch_variant"`
}
@@ -242,7 +247,7 @@
ClangTidy *bool `json:",omitempty"`
TidyChecks *string `json:",omitempty"`
- NativeCoverage *bool `json:",omitempty"`
+ Native_coverage *bool `json:",omitempty"`
ClangCoverage *bool `json:",omitempty"`
CoveragePaths []string `json:",omitempty"`
CoverageExcludePaths []string `json:",omitempty"`