Manually install hwasan runtime on SANITIZE_TARGET=hwaddress builds
Due to bugs in Soong around prebuilt libraries with stubs versions,
the hwasan runtime was installed into /system/lib64/bootstrap, but the
module was not given a ".bootstrap" suffix. Once the bugs are fixed,
the hwasan runtime is no longer installed because the dependencies
on "libclang_rt.hwasan-aarch64-android" are now on an uninstallable
stubs library. Add libclang_rt.hwasan-aarch64-android.bootstrap
to PRODUCT_PACKAGES when SANITIZE_TARGET=hwaddress is set.
Test: m checkbuild
Change-Id: I732d37505274c7bf804396921202f2bcca4484ec
diff --git a/target/product/base_system.mk b/target/product/base_system.mk
index b97d98d..586c058 100644
--- a/target/product/base_system.mk
+++ b/target/product/base_system.mk
@@ -281,6 +281,12 @@
system_manifest.xml \
system_compatibility_matrix.xml \
+# HWASAN runtime for SANITIZE_TARGET=hwaddress builds
+ifneq (,$(filter hwaddress,$(SANITIZE_TARGET)))
+ PRODUCT_PACKAGES += \
+ libclang_rt.hwasan-aarch64-android.bootstrap
+endif
+
# Host tools to install
PRODUCT_HOST_PACKAGES += \
BugReport \