Merge "Override module's C flags when coverage is enabled"

This commit is contained in:
Treehugger Robot 2019-02-20 05:40:18 +00:00 committed by Gerrit Code Review
commit e67c20ce90

View file

@ -53,6 +53,10 @@ func (cov *coverage) flags(ctx ModuleContext, flags Flags) Flags {
flags.Coverage = true
flags.GlobalFlags = append(flags.GlobalFlags, "--coverage", "-O0")
cov.linkCoverage = true
// Override -Wframe-larger-than and non-default optimization
// flags that the module may use.
flags.CFlags = append(flags.CFlags, "-Wno-frame-larger-than=", "-O0")
}
// Even if we don't have coverage enabled, if any of our object files were compiled