Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e63be2a7 authored by Nelson Li's avatar Nelson Li
Browse files

Add HOST_PREFER_32_BIT to Soong Config and move art-tools to product configuration.

This change accomplishes two things:

Adds `HOST_PREFER_32_BIT` to Soong config variables:
The `HOST_PREFER_32_BIT` environment variable is frequently used in
Android.mk files within the art/ directory. By adding it to
soong_config_variable, we make it accessible to the Soong build system,
which will be essential when converting art modules to Android.bp.

Moves `art-tools` to product configuration:
Originally, `art-tools` was a phony target added to
PRODUCT_HOST_PACKAGES. This approach is incorrect because
PRODUCT_HOST_PACKAGES should only contain actual modules, not phony
targets. We are addressing this by converting the dependencies and
conditional statements (ifeq) within `art-tools` into
PRODUCT_HOST_PACKAGES entries in base_system.mk.

Bug: 346702835
Test: m -j; Then, check related dependencies build in the system.
Change-Id: Iab252dea71c9df9d75f2701b33d3cd4d391e7f5d
parent 31964df6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -44,6 +44,8 @@ $(call soong_config_set_bool,ANDROID,SANITIZE_TARGET_SYSTEM_ENABLED,$(if $(filte
# 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
+15 −1
Original line number Diff line number Diff line
@@ -403,7 +403,6 @@ PRODUCT_HOST_PACKAGES += \
    BugReport \
    adb \
    adevice \
    art-tools \
    atest \
    bcc \
    bit \
@@ -434,6 +433,21 @@ PRODUCT_HOST_PACKAGES += \
    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