VSDK: capture hwasan static libs for vsdk snapshot build
When generating vsdk snapshot with SANITIZE_TARGET=hwaddress option,
include hwasan static libraries to the vendor snapshot.
Bug: 234772527
Test: build against the vsdk with SANITIZE_TARGET=hwaddress
Change-Id: I6fdecefaa8557b5c968745487a3ed7c959e682f9
diff --git a/cc/sanitize.go b/cc/sanitize.go
index eba709b..dc07381 100644
--- a/cc/sanitize.go
+++ b/cc/sanitize.go
@@ -1067,6 +1067,11 @@
// as vendor snapshot. Such modules must create both cfi and non-cfi variants,
// except for ones which explicitly disable cfi.
func needsCfiForVendorSnapshot(mctx android.BaseModuleContext) bool {
+ if inList("hwaddress", mctx.Config().SanitizeDevice()) {
+ // cfi will not be built if SANITIZE_TARGET=hwaddress is set
+ return false
+ }
+
if snapshot.IsVendorProprietaryModule(mctx) {
return false
}