From e726ba56ac38673972adf0c1945c32a899901b1e Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Thu, 21 Mar 2019 16:21:44 -0700 Subject: [PATCH] Pass -fsanitize-hwaddress-abi=platform when building with hwasan. Reduces size of walleye_hwasan-userdebug system.img by another 4.5MB. Bug: 122363025 Change-Id: I6d15c237dc5f330ad574a73147b2b2c712fe125e --- cc/sanitize.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cc/sanitize.go b/cc/sanitize.go index 26418addc..2d80c2213 100644 --- a/cc/sanitize.go +++ b/cc/sanitize.go @@ -39,7 +39,8 @@ var ( // the default. hwasanCflags = []string{"-fno-omit-frame-pointer", "-Wno-frame-larger-than=", "-mllvm", "-hwasan-create-frame-descriptions=0", - "-mllvm", "-hwasan-allow-ifunc"} + "-mllvm", "-hwasan-allow-ifunc", + "-fsanitize-hwaddress-abi=platform"} cfiCflags = []string{"-flto", "-fsanitize-cfi-cross-dso", "-fsanitize-blacklist=external/compiler-rt/lib/cfi/cfi_blacklist.txt"}