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

View file

@ -181,11 +181,11 @@ type Flags struct {
// These must be after any module include flags, which will be in CommonFlags. // These must be after any module include flags, which will be in CommonFlags.
SystemIncludeFlags []string SystemIncludeFlags []string
Toolchain config.Toolchain Toolchain config.Toolchain
Tidy bool Tidy bool
Coverage bool GcovCoverage bool
SAbiDump bool SAbiDump bool
EmitXrefs bool // If true, generate Ninja rules to generate emitXrefs input files for Kythe EmitXrefs bool // If true, generate Ninja rules to generate emitXrefs input files for Kythe
RequiredInstructionSet string RequiredInstructionSet string
DynamicLinker string DynamicLinker string

View file

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

View file

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