Merge "Add handling for libc_hwasan to Soong"

This commit is contained in:
Florian Mayer
2023-04-14 23:27:57 +00:00
committed by Gerrit Code Review
4 changed files with 22 additions and 3 deletions

View File

@@ -792,6 +792,13 @@ func (s *sanitize) flags(ctx ModuleContext, flags Flags) Flags {
if Bool(sanProps.Writeonly) {
flags.Local.CFlags = append(flags.Local.CFlags, "-mllvm", "-hwasan-instrument-reads=0")
}
if !ctx.staticBinary() && !ctx.Host() {
if ctx.bootstrap() {
flags.DynamicLinker = "/system/bin/bootstrap/linker_hwasan64"
} else {
flags.DynamicLinker = "/system/bin/linker_hwasan64"
}
}
}
if Bool(sanProps.Fuzzer) {