Revert "Define vendor-hwasan-snapshot target"
This reverts commit 97c140ccadbf372770badacbdb1590e72b9648ba.
As vsdk can capture hwasan snapshot with aosp/2358699, we don't need
this workaround any more.
Bug: 234772527
Test: TH
Change-Id: I94e751949d679a31060bb5fea0147947fc6682f4
diff --git a/core/tasks/vendor_snapshot.mk b/core/tasks/vendor_snapshot.mk
index 3623235..83c1379 100644
--- a/core/tasks/vendor_snapshot.mk
+++ b/core/tasks/vendor_snapshot.mk
@@ -27,56 +27,6 @@
$(call dist-for-goals, vendor-fake-snapshot, $(SOONG_VENDOR_FAKE_SNAPSHOT_ZIP):fake/$(notdir $(SOONG_VENDOR_FAKE_SNAPSHOT_ZIP)))
-# Capture prebuilt vendor static libraries of hwasan variant.
-# To build the hwasan variant `SANITIZE_TARGET=hwaddress` must be set.
-# vendor-hwasan-snapshot goal zips hwasan static libs listed in
-# PRODUCT_VSDK_HWASAN_STATIC_PATHS which has a list of pairs of
-# 'module name':'source directory path'
-ifeq ($(SANITIZE_TARGET),hwaddress)
-
-vsdk_hwasan_static_zip := $(PRODUCT_OUT)/vsdk-hwasan-snapshot.zip
-vsdk_hwasan_static_dir := $(PRODUCT_OUT)/vsdk-hwasan-snapshot
-vsdk_hwasan_variants := \
- android \
- vendor.$(PLATFORM_VNDK_VERSION) \
- $(TARGET_ARCH) \
- $(TARGET_ARCH_VARIANT) \
- $(TARGET_CPU_VARIANT) \
- static \
- hwasan
-vsdk_hwasan_variant_name := $(subst _generic_,_,$(subst $(space),_,$(vsdk_hwasan_variants)))
-
-define get_vendor_hwasan_static_path
-$(SOONG_OUT_DIR)/.intermediates/$(call word-colon,2,$(1))/$(call word-colon,1,$(1))/$(vsdk_hwasan_variant_name)/$(call word-colon,1,$(1)).a
-endef
-
-$(vsdk_hwasan_static_zip): PRIVATE_MAKEFILE := $(current_makefile)
-$(vsdk_hwasan_static_zip): PRIVATE_HWASAN_DIR := $(vsdk_hwasan_static_dir)
-$(vsdk_hwasan_static_zip): $(SOONG_ZIP) $(foreach p, $(PRODUCT_VSDK_HWASAN_STATIC_PATHS), $(call get_vendor_hwasan_static_path,$(p)))
- $(if $(PRODUCT_VSDK_HWASAN_STATIC_PATHS),,\
- $(call echo-error,$(PRIVATE_MAKEFILE),\
- "CANNOT generate Vendor HWASAN snapshot. PRODUCT_VSDK_HWASAN_STATIC_PATHS is not defined.") &&\
- exit 1)
- @rm -rf $(PRIVATE_HWASAN_DIR)
- @mkdir -p $(PRIVATE_HWASAN_DIR)
- $(foreach p, $(PRODUCT_VSDK_HWASAN_STATIC_PATHS), \
- cp -f $(call get_vendor_hwasan_static_path,$(p)) $(PRIVATE_HWASAN_DIR) &&) true
- $(SOONG_ZIP) -o $@ -C $(PRIVATE_HWASAN_DIR) -D $(PRIVATE_HWASAN_DIR)
-
-.PHONY: vendor-hwasan-snapshot
-vendor-hwasan-snapshot: $(vsdk_hwasan_static_zip)
-
-$(call dist-for-goals, vendor-hwasan-snapshot, $(vsdk_hwasan_static_zip))
-
-else # Not for the HWASAN build
-.PHONY: vendor-hwasan-snapshot
-vendor-hwasan-snapshot: PRIVATE_MAKEFILE := $(current_makefile)
-vendor-hwasan-snapshot:
- $(call echo-error,$(PRIVATE_MAKEFILE),\
- "CANNOT generate Vendor HWASAN snapshot. SANITIZE_TARGET must be set to 'hwaddress'.")
- exit 1
-endif # SANITIZE_TARGET
-
else # BOARD_VNDK_VERSION is NOT set to 'current'
.PHONY: vendor-snapshot
@@ -93,11 +43,4 @@
"CANNOT generate Vendor snapshot. BOARD_VNDK_VERSION must be set to 'current'.")
exit 1
-.PHONY: vendor-hwasan-snapshot
-vendor-hwasan-snapshot: PRIVATE_MAKEFILE := $(current_makefile)
-vendor-hwasan-snapshot:
- $(call echo-error,$(PRIVATE_MAKEFILE),\
- "CANNOT generate Vendor HWASAN snapshot. BOARD_VNDK_VERSION must be set to 'current'.")
- exit 1
-
endif # BOARD_VNDK_VERSION