From fb2734e36b4a99d3fa7393f0941e2a6500fbff33 Mon Sep 17 00:00:00 2001 From: Jiakai Zhang Date: Mon, 20 Mar 2023 18:42:13 +0000 Subject: [PATCH] Use the boot image mainline extension when dexpreopting in Make. aosp/2470961 introduces a boot image mainline extension. We need to use it when dexpreopting apps in Make. Bug: 274059172 Bug: 269230245 Test: See "boot-framework-adservices.art" in out/target/product/vsoc_x86_64/obj/APPS/PrebuiltGmail_intermediates/oat/x86_64/package.invocation on internal master. Change-Id: Ic0b1753a0066bd16a31de028743f1ad908e9bdfc --- core/dex_preopt_odex_install.mk | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/core/dex_preopt_odex_install.mk b/core/dex_preopt_odex_install.mk index 05bb669b64..d4988750dc 100644 --- a/core/dex_preopt_odex_install.mk +++ b/core/dex_preopt_odex_install.mk @@ -272,12 +272,13 @@ my_dexpreopt_images := my_dexpreopt_images_deps := my_dexpreopt_image_locations_on_host := my_dexpreopt_image_locations_on_device := -# Infix can be 'boot' or 'art'. Soong creates a set of variables for Make, one -# for each boot image (primary and the framework extension). The only reason why -# the primary image is exposed to Make is testing (art gtests) and benchmarking -# (art golem benchmarks). Install rules that use those variables are in -# dex_preopt_libart.mk. Here for dexpreopt purposes the infix is always 'boot'. -my_dexpreopt_infix := boot +# Infix can be 'art', 'boot', or 'mainline'. Soong creates a set of variables +# for Make, one or each boot image (primary, the framework extension, and the +# mainline extension). The only reason why the primary image is exposed to Make +# is testing (art gtests) and benchmarking (art golem benchmarks). Install rules +# that use those variables are in dex_preopt_libart.mk. Here for dexpreopt +# purposes the infix is always 'boot' or 'mainline'. +my_dexpreopt_infix := $(if $(filter true,$(DEX_PREOPT_WITH_UPDATABLE_BCP)),mainline,boot) my_create_dexpreopt_config := ifdef LOCAL_DEX_PREOPT @@ -507,4 +508,4 @@ ifdef LOCAL_DEX_PREOPT my_dexpreopt_zip := my_dexpreopt_config_for_postprocessing := endif # LOCAL_DEX_PREOPT -endif # my_create_dexpreopt_config \ No newline at end of file +endif # my_create_dexpreopt_config