Merge "Only package gcno files for gcov coverage builds." into rvc-dev
This commit is contained in:
commit
b636300911
4 changed files with 10 additions and 10 deletions
|
@ -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
|
||||||
|
|
2
cc/cc.go
2
cc/cc.go
|
@ -183,7 +183,7 @@ type Flags struct {
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue