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
This commit is contained in:
Kyriakos Ispoglou 2020-01-24 13:14:33 -08:00
parent 56bcaa6dc1
commit db03c22e54
2 changed files with 6 additions and 1 deletions

View file

@ -1028,8 +1028,12 @@ func (c *deviceConfig) DeviceKernelHeaderDirs() []string {
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 {

View file

@ -252,6 +252,7 @@ type productVariables struct {
ClangTidy *bool `json:",omitempty"`
TidyChecks *string `json:",omitempty"`
NativeLineCoverage *bool `json:",omitempty"`
Native_coverage *bool `json:",omitempty"`
ClangCoverage *bool `json:",omitempty"`
CoveragePaths []string `json:",omitempty"`