diff options
Diffstat (limited to 'cc/coverage.go')
-rw-r--r-- | cc/coverage.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cc/coverage.go b/cc/coverage.go index d0902eab8..a7356f879 100644 --- a/cc/coverage.go +++ b/cc/coverage.go @@ -108,6 +108,12 @@ func (cov *coverage) flags(ctx ModuleContext, flags Flags, deps PathDeps) (Flags if EnableContinuousCoverage(ctx) { flags.Local.CommonFlags = append(flags.Local.CommonFlags, "-mllvm", "-runtime-counter-relocation") } + + // http://b/248022906, http://b/247941801 enabling coverage and hwasan-globals + // instrumentation together causes duplicate-symbol errors for __llvm_profile_filename. + if c, ok := ctx.Module().(*Module); ok && c.sanitize.isSanitizerEnabled(Hwasan) { + flags.Local.CommonFlags = append(flags.Local.CommonFlags, "-mllvm", "-hwasan-globals=0") + } } } |