Merge "Only package gcno files for gcov coverage builds."
This commit is contained in:
commit
0e8579b4f1
|
@ -307,7 +307,7 @@ type builderFlags struct {
|
|||
rsFlags string
|
||||
toolchain config.Toolchain
|
||||
tidy bool
|
||||
coverage bool
|
||||
gcovCoverage bool
|
||||
sAbiDump bool
|
||||
emitXrefs bool
|
||||
|
||||
|
@ -369,7 +369,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
|
||||
|
@ -470,7 +470,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
|
||||
|
|
10
cc/cc.go
10
cc/cc.go
|
@ -182,11 +182,11 @@ type Flags struct {
|
|||
// These must be after any module include flags, which will be in CommonFlags.
|
||||
SystemIncludeFlags []string
|
||||
|
||||
Toolchain config.Toolchain
|
||||
Tidy bool
|
||||
Coverage bool
|
||||
SAbiDump bool
|
||||
EmitXrefs bool // If true, generate Ninja rules to generate emitXrefs input files for Kythe
|
||||
Toolchain config.Toolchain
|
||||
Tidy bool
|
||||
GcovCoverage bool
|
||||
SAbiDump bool
|
||||
EmitXrefs bool // If true, generate Ninja rules to generate emitXrefs input files for Kythe
|
||||
|
||||
RequiredInstructionSet string
|
||||
DynamicLinker string
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue