Add support for LINE_COVERAGE (1/2)
This is the 1st part of the CL. It adds support to enable compilation
of line coverage instrumented binaries. For more details please refer
to the design doc: go/android-line-coverage-doc
Bug: b/147604881
Test: Code works successfully on Taimen devices
Change-Id: I07745c1438b611041ed032dd4b7788cb50130845
diff --git a/android/config.go b/android/config.go
index da4f8e2..d0ac4c3 100644
--- a/android/config.go
+++ b/android/config.go
@@ -1028,8 +1028,12 @@
return c.config.productVariables.DeviceKernelHeaders
}
+func (c *config) NativeLineCoverage() bool {
+ return Bool(c.productVariables.NativeLineCoverage)
+}
+
func (c *deviceConfig) NativeCoverageEnabled() bool {
- return Bool(c.config.productVariables.Native_coverage)
+ return Bool(c.config.productVariables.Native_coverage) || Bool(c.config.productVariables.NativeLineCoverage)
}
func (c *deviceConfig) ClangCoverageEnabled() bool {