Merge "Only package gcno files for gcov coverage builds." into rvc-dev

This commit is contained in:
Oliver Nguyen 2020-04-22 20:28:40 +00:00 committed by Android (Google) Code Review
commit b636300911
4 changed files with 10 additions and 10 deletions

View file

@ -293,7 +293,7 @@ type builderFlags struct {
rsFlags string
toolchain config.Toolchain
tidy bool
coverage bool
gcovCoverage bool
sAbiDump bool
emitXrefs bool
@ -355,7 +355,7 @@ func TransformSourceToObj(ctx android.ModuleContext, subdir string, srcFiles and
tidyFiles = make(android.Paths, 0, len(srcFiles))
}
var coverageFiles android.Paths
if flags.coverage {
if flags.gcovCoverage {
coverageFiles = make(android.Paths, 0, len(srcFiles))
}
var kytheFiles android.Paths
@ -456,7 +456,7 @@ func TransformSourceToObj(ctx android.ModuleContext, subdir string, srcFiles and
var ccCmd string
tidy := flags.tidy
coverage := flags.coverage
coverage := flags.gcovCoverage
dump := flags.sAbiDump
rule := cc
emitXref := flags.emitXrefs

View file

@ -183,7 +183,7 @@ type Flags struct {
Toolchain config.Toolchain
Tidy bool
Coverage bool
GcovCoverage bool
SAbiDump bool
EmitXrefs bool // If true, generate Ninja rules to generate emitXrefs input files for Kythe

View file

@ -82,10 +82,10 @@ func (cov *coverage) flags(ctx ModuleContext, flags Flags, deps PathDeps) (Flags
}
if cov.Properties.CoverageEnabled {
flags.Coverage = true
cov.linkCoverage = true
if gcovCoverage {
flags.GcovCoverage = true
flags.Local.CommonFlags = append(flags.Local.CommonFlags, "--coverage", "-O0")
// Override -Wframe-larger-than and non-default optimization

View file

@ -82,7 +82,7 @@ func flagsToBuilderFlags(in Flags) builderFlags {
tidyFlags: strings.Join(in.TidyFlags, " "),
sAbiFlags: strings.Join(in.SAbiFlags, " "),
toolchain: in.Toolchain,
coverage: in.Coverage,
gcovCoverage: in.GcovCoverage,
tidy: in.Tidy,
sAbiDump: in.SAbiDump,
emitXrefs: in.EmitXrefs,