Reland: Don't use hwasan for non-bionic arm64 targets
Don't use hwasan for non-bionic arm64 targets, including arm64-linux-musl and arm64 darwin. This relands I67c07f26f25a9f9807ee21ee79c113ea11f65473 which was accidentally reverted in I47a9322929baff2492c6e8db989ece01fcbeb133. Bug: 236052820 Test: build arm64 musl sysroot Change-Id: I77753ecb6f07aafa1b6e00ad6bf432f9c9744f79
This commit is contained in:
@@ -430,7 +430,7 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Enable Memtag for all components in the include paths (for Aarch64 only)
|
// Enable Memtag for all components in the include paths (for Aarch64 only)
|
||||||
if ctx.Arch().ArchType == android.Arm64 {
|
if ctx.Arch().ArchType == android.Arm64 && ctx.toolchain().Bionic() {
|
||||||
if ctx.Config().MemtagHeapSyncEnabledForPath(ctx.ModuleDir()) {
|
if ctx.Config().MemtagHeapSyncEnabledForPath(ctx.ModuleDir()) {
|
||||||
if s.Memtag_heap == nil {
|
if s.Memtag_heap == nil {
|
||||||
s.Memtag_heap = proptools.BoolPtr(true)
|
s.Memtag_heap = proptools.BoolPtr(true)
|
||||||
@@ -460,17 +460,17 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// HWASan requires AArch64 hardware feature (top-byte-ignore).
|
// HWASan requires AArch64 hardware feature (top-byte-ignore).
|
||||||
if ctx.Arch().ArchType != android.Arm64 {
|
if ctx.Arch().ArchType != android.Arm64 || !ctx.toolchain().Bionic() {
|
||||||
s.Hwaddress = nil
|
s.Hwaddress = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// SCS is only implemented on AArch64.
|
// SCS is only implemented on AArch64.
|
||||||
if ctx.Arch().ArchType != android.Arm64 {
|
if ctx.Arch().ArchType != android.Arm64 || !ctx.toolchain().Bionic() {
|
||||||
s.Scs = nil
|
s.Scs = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Memtag_heap is only implemented on AArch64.
|
// Memtag_heap is only implemented on AArch64.
|
||||||
if ctx.Arch().ArchType != android.Arm64 {
|
if ctx.Arch().ArchType != android.Arm64 || !ctx.toolchain().Bionic() {
|
||||||
s.Memtag_heap = nil
|
s.Memtag_heap = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user