Ignore pass-failed warnings on coverage builds.

Clang coverage can disable certain passes, which throws a warning. Some
modules treat all warnings as errors, causing them to fail to build with
Clang coverage. Disable this warning only on coverage builds, as it is
still a useful warning for non-coverage builds.

Bug: 156609447
Test: m CLANG_COVERAGE=true COVERAGE_PATHS='*' libyuv
Change-Id: I1146befc382931f7eb0f1145ec63b90757600b61
This commit is contained in:
Oliver Nguyen
2020-05-14 13:27:56 -07:00
parent 6109adaee0
commit 46f6dd78ff

View File

@@ -92,7 +92,7 @@ func (cov *coverage) flags(ctx ModuleContext, flags Flags, deps PathDeps) (Flags
// flags that the module may use.
flags.Local.CFlags = append(flags.Local.CFlags, "-Wno-frame-larger-than=", "-O0")
} else if clangCoverage {
flags.Local.CommonFlags = append(flags.Local.CommonFlags, "-fprofile-instr-generate", "-fcoverage-mapping")
flags.Local.CommonFlags = append(flags.Local.CommonFlags, "-fprofile-instr-generate", "-fcoverage-mapping", "-Wno-pass-failed")
}
}