Build VNDK snapshot for products aosp_[arm|x86]

P VNDK snapshot needs to include VNDK libs built for 64-bit binder
products, aosp_arm and aosp_x86. This change modifies the following:

1) Revise VNDK snapshot zip file name to use $TARGET_PRODUCT instead of
$TARGET_ARCH in order to distinguish aosp_arm and aosp_arm_ab.
2) Place 32-bit binder libs under a subdirectory 'binder32' such that
the snapshots can be uploaded to prebuilts/vndk/v{VER} with the following
directory structure:

  prebuilts/vndk/v{VER}/
    arm/
      arch-arm-armv7-a-neon/
        shared/
          ...
      binder32/
        arch-arm-armv7-a-neon/
          shared/
            ...
      ...
    arm64/
      arch-arm-armv7-a-neon/
      arch-arm64-armv8-a/
      ...
    ...

The 32-bit binder libs will be placed in a separate subdirectory so that
they can be easily phased out in future VNDK snapshots.

Bug: 80372796
Test: make -j vndk dist
Merged-In: I7cde2e706e0c2891bab762b9057672f57e798873
Change-Id: I7cde2e706e0c2891bab762b9057672f57e798873
(cherry picked from commit 3ba44eb916563d16f68e06b50543c334fd48fa1f)
diff --git a/core/tasks/vndk.mk b/core/tasks/vndk.mk
index 3604aed..b9133df 100644
--- a/core/tasks/vndk.mk
+++ b/core/tasks/vndk.mk
@@ -141,9 +141,13 @@
 #######################################
 # vndk_snapshot_zip
 vndk_snapshot_variant := $(vndk_snapshot_out)/$(TARGET_ARCH)
-vndk_lib_dir := $(vndk_snapshot_variant)/arch-$(TARGET_ARCH)-$(TARGET_ARCH_VARIANT)
-vndk_lib_dir_2nd := $(vndk_snapshot_variant)/arch-$(TARGET_2ND_ARCH)-$(TARGET_2ND_ARCH_VARIANT)
-vndk_snapshot_zip := $(PRODUCT_OUT)/android-vndk-$(TARGET_ARCH).zip
+binder :=
+ifneq ($(TARGET_USES_64_BIT_BINDER), true)
+  binder := binder32
+endif
+vndk_lib_dir := $(subst $(space),/,$(strip $(vndk_snapshot_variant) $(binder) arch-$(TARGET_ARCH)-$(TARGET_ARCH_VARIANT)))
+vndk_lib_dir_2nd := $(subst $(space),/,$(strip $(vndk_snapshot_variant) $(binder) arch-$(TARGET_2ND_ARCH)-$(TARGET_2ND_ARCH_VARIANT)))
+vndk_snapshot_zip := $(PRODUCT_OUT)/android-vndk-$(TARGET_PRODUCT).zip
 
 $(vndk_snapshot_zip): PRIVATE_VNDK_SNAPSHOT_OUT := $(vndk_snapshot_out)
 
@@ -233,6 +237,7 @@
 vndk_snapshot_out :=
 vndk_snapshot_configs_out :=
 vndk_snapshot_variant :=
+binder :=
 vndk_lib_dir :=
 vndk_lib_dir_2nd :=
 vndk_snapshot_dependencies :=