Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9cf38ca authored by Pirama Arumuga Nainar's avatar Pirama Arumuga Nainar Committed by Gerrit Code Review
Browse files

Merge "[coverage] On coverage+hwasan build, disable hwasan global instrumentation"

parents 883300c3 2bcdf5ed
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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")
			}
		}
	}