Add "hwaddress" sanitizer.
Build/make support for "hwaddress".
* HWASan supports static binaries, unlike ASan.
* It will be used to build libc. Since static libraries get a .hwasan
suffix in soong, the logic that moves libc-and-friends to the end
of the link command line has to be updated.
Bug: 112438058
Test: manual, part of a bigger patch set
Change-Id: I3b52336841012622771a88ba161916bc33071dfe
diff --git a/core/Makefile b/core/Makefile
index 40f252f..afebd35 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1664,7 +1664,7 @@
# ASAN libraries in the system image - add dependency.
ASAN_IN_SYSTEM_INSTALLED := $(TARGET_OUT)/asan.tar.bz2
-ifneq (,$(SANITIZE_TARGET))
+ifneq (,$(filter address, $(SANITIZE_TARGET)))
ifeq (true,$(SANITIZE_TARGET_SYSTEM))
FULL_SYSTEMIMAGE_DEPS += $(ASAN_IN_SYSTEM_INSTALLED)
endif