From 46f6dd78ff9988ea1c0bad9f2e560af5019dc0db Mon Sep 17 00:00:00 2001 From: Oliver Nguyen Date: Thu, 14 May 2020 13:27:56 -0700 Subject: [PATCH] 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 --- cc/coverage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cc/coverage.go b/cc/coverage.go index cc9a1adab..f885fcbc2 100644 --- a/cc/coverage.go +++ b/cc/coverage.go @@ -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") } }