Merge "Add HOST_PREFER_32_BIT to Soong Config and move art-tools to product configuration." into main
diff --git a/core/android_soong_config_vars.mk b/core/android_soong_config_vars.mk
index 0f925a7..461b284 100644
--- a/core/android_soong_config_vars.mk
+++ b/core/android_soong_config_vars.mk
@@ -44,6 +44,8 @@
# PRODUCT_PRECOMPILED_SEPOLICY defaults to true. Explicitly check if it's "false" or not.
$(call soong_config_set_bool,ANDROID,PRODUCT_PRECOMPILED_SEPOLICY,$(if $(filter false,$(PRODUCT_PRECOMPILED_SEPOLICY)),false,true))
+# For art modules
+$(call soong_config_set_bool,art_module,host_prefer_32_bit,$(if $(filter true,$(HOST_PREFER_32_BIT)),true,false))
ifdef ART_DEBUG_OPT_FLAG
$(call soong_config_set,art_module,art_debug_opt_flag,$(ART_DEBUG_OPT_FLAG))
endif
diff --git a/target/product/base_system.mk b/target/product/base_system.mk
index 9728cc0..2b726c1 100644
--- a/target/product/base_system.mk
+++ b/target/product/base_system.mk
@@ -403,7 +403,6 @@
BugReport \
adb \
adevice \
- art-tools \
atest \
bcc \
bit \
@@ -434,6 +433,21 @@
tz_version_host \
tz_version_host_tzdata_apex \
+# For art-tools, if the dependencies have changed, please sync them to art/Android.bp as well.
+PRODUCT_HOST_PACKAGES += \
+ ahat \
+ dexdump \
+ hprof-conv
+# A subset of the tools are disabled when HOST_PREFER_32_BIT is defined as make reports that
+# they are not supported on host (b/129323791). This is likely due to art_apex disabling host
+# APEX builds when HOST_PREFER_32_BIT is set (b/120617876).
+ifneq ($(HOST_PREFER_32_BIT),true)
+PRODUCT_HOST_PACKAGES += \
+ dexlist \
+ oatdump
+endif
+
+
PRODUCT_PACKAGES += init.usb.rc init.usb.configfs.rc
PRODUCT_PACKAGES += etc_hosts