apex: install hwasan lib if depended on libc
There're two ways to enable hwasan:
- global setting: TARGET_SANITIZE=hwaddress
- individual setting: sanitize: { hwaddress: true }
This change covers both cases by looking up if com.android.runtime is
hwaddress santized or not.
Bug: 156678661
Test: m (soong test added)
Change-Id: I67c382c3e76a06f4b27f221eebd153c698647227
diff --git a/cc/cc.go b/cc/cc.go
index fbd5bdf..49536c3 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1068,7 +1068,7 @@
func InstallToBootstrap(name string, config android.Config) bool {
if name == "libclang_rt.hwasan-aarch64-android" {
- return inList("hwaddress", config.SanitizeDevice())
+ return true
}
return isBionic(name)
}