rust: Only apply hwasan flags once to fuzz targets
On HWASAN global sanitized builds, fuzz targets had hwasanFlags applied twice. Rust only allows llvm-args flags to be passed in once however, so this broke compilation. Bug: 204915322 Test: SANITIZE_TARGET='hwaddress fuzzer' m <fuzzer> Change-Id: I4f6c35e04bc4c891d9c66e8a53c3dcb88e8670cf
This commit is contained in:
@@ -237,12 +237,10 @@ func (sanitize *sanitize) flags(ctx ModuleContext, flags Flags, deps PathDeps) (
|
||||
} else {
|
||||
flags.RustFlags = append(flags.RustFlags, asanFlags...)
|
||||
}
|
||||
}
|
||||
if Bool(sanitize.Properties.Sanitize.Address) {
|
||||
flags.RustFlags = append(flags.RustFlags, asanFlags...)
|
||||
}
|
||||
if Bool(sanitize.Properties.Sanitize.Hwaddress) {
|
||||
} else if Bool(sanitize.Properties.Sanitize.Hwaddress) {
|
||||
flags.RustFlags = append(flags.RustFlags, hwasanFlags...)
|
||||
} else if Bool(sanitize.Properties.Sanitize.Address) {
|
||||
flags.RustFlags = append(flags.RustFlags, asanFlags...)
|
||||
}
|
||||
return flags, deps
|
||||
}
|
||||
|
Reference in New Issue
Block a user