Add handling for libc_hwasan to Soong
libc_hwasan is a new library in the runtime apex that lives in bionic/hwasan/libc.so and is symlinked to /system/lib64/hwasan/libc.so. This is chosen by the linker if an app or binary requires HWASan support. Bug: 276930343 Change-Id: If331744ad84241ad99a41805ea3110d37cf9b0af
This commit is contained in:
@@ -785,6 +785,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) {
|
||||
|
Reference in New Issue
Block a user