Pass -hwasan-allow-ifunc when building with hwasan.

Now that the toolchain and bionic both support ifuncs in
static executables, we can turn this on. Reduces size of
walleye_hwasan-userdebug system.img by 11MB.

Change-Id: I2f19b22518153328eee3fdca79d0c851cc513c3a
This commit is contained in:
Peter Collingbourne
2019-03-19 21:39:54 -07:00
parent 8a49795df1
commit 967511a4e8

View File

@@ -35,7 +35,11 @@ var (
asanLdflags = []string{"-Wl,-u,__asan_preinit"} asanLdflags = []string{"-Wl,-u,__asan_preinit"}
asanLibs = []string{"libasan"} asanLibs = []string{"libasan"}
hwasanCflags = []string{"-fno-omit-frame-pointer", "-Wno-frame-larger-than=", "-mllvm", "-hwasan-create-frame-descriptions=0"} // TODO(pcc): Stop passing -hwasan-allow-ifunc here once it has been made
// the default.
hwasanCflags = []string{"-fno-omit-frame-pointer", "-Wno-frame-larger-than=",
"-mllvm", "-hwasan-create-frame-descriptions=0",
"-mllvm", "-hwasan-allow-ifunc"}
cfiCflags = []string{"-flto", "-fsanitize-cfi-cross-dso", cfiCflags = []string{"-flto", "-fsanitize-cfi-cross-dso",
"-fsanitize-blacklist=external/compiler-rt/lib/cfi/cfi_blacklist.txt"} "-fsanitize-blacklist=external/compiler-rt/lib/cfi/cfi_blacklist.txt"}