From cb4c3576615d2505fcf6cc58d38df2e8801a6b81 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Thu, 13 Jun 2019 21:35:42 +0000 Subject: [PATCH] Use dexpreopt image deps from Soong Instead of just depending on the single image file, depend on the entire image that gets loaded -- the .oat / .vdex files, and the modules that are part of the image that have their own files. This is necessary for RBE, where the rule only gets the files that it depends upon. Test: treehugger Test: build a system image with RBE Change-Id: I93a580b42cf4ef1824ee1397e551c065f083348a --- core/dex_preopt_odex_install.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/dex_preopt_odex_install.mk b/core/dex_preopt_odex_install.mk index 9832c2f075..50e922e36d 100644 --- a/core/dex_preopt_odex_install.mk +++ b/core/dex_preopt_odex_install.mk @@ -105,6 +105,7 @@ endif my_dexpreopt_archs := my_dexpreopt_images := +my_dexpreopt_images_deps := my_dexpreopt_infix := boot ifeq (true, $(DEXPREOPT_USE_APEX_IMAGE)) my_dexpreopt_infix := apex @@ -143,12 +144,14 @@ ifdef LOCAL_DEX_PREOPT # Odex for the 1st arch my_dexpreopt_archs += $(TARGET_ARCH) my_dexpreopt_images += $(DEXPREOPT_IMAGE_$(my_dexpreopt_infix)_$(TARGET_ARCH)) + my_dexpreopt_images_deps += $(DEXPREOPT_IMAGE_DEPS_$(my_dexpreopt_infix)_$(TARGET_ARCH)) # Odex for the 2nd arch ifdef TARGET_2ND_ARCH ifneq ($(TARGET_TRANSLATE_2ND_ARCH),true) ifneq (first,$(my_module_multilib)) my_dexpreopt_archs += $(TARGET_2ND_ARCH) my_dexpreopt_images += $(DEXPREOPT_IMAGE_$(my_dexpreopt_infix)_$(TARGET_2ND_ARCH)) + my_dexpreopt_images_deps += $(DEXPREOPT_IMAGE_DEPS_$(my_dexpreopt_infix)_$(TARGET_2ND_ARCH)) endif # my_module_multilib is not first. endif # TARGET_TRANSLATE_2ND_ARCH not true endif # TARGET_2ND_ARCH @@ -160,6 +163,8 @@ ifdef LOCAL_DEX_PREOPT my_dexpreopt_archs += $(TARGET_$(my_2nd_arch_prefix)ARCH) my_dexpreopt_images += \ $(DEXPREOPT_IMAGE_$(my_dexpreopt_infix)_$(TARGET_$(my_2nd_arch_prefix)ARCH)) + my_dexpreopt_images_deps += \ + $(DEXPREOPT_IMAGE_DEPS_$(my_dexpreopt_infix)_$(TARGET_$(my_2nd_arch_prefix)ARCH)) ifdef TARGET_2ND_ARCH ifeq ($(my_module_multilib),both) # The non-preferred arch @@ -167,6 +172,8 @@ ifdef LOCAL_DEX_PREOPT my_dexpreopt_archs += $(TARGET_$(my_2nd_arch_prefix)ARCH) my_dexpreopt_images += \ $(DEXPREOPT_IMAGE_$(my_dexpreopt_infix)_$(TARGET_$(my_2nd_arch_prefix)ARCH)) + my_dexpreopt_images_deps += \ + $(DEXPREOPT_IMAGE_DEPS_$(my_dexpreopt_infix)_$(TARGET_$(my_2nd_arch_prefix)ARCH)) endif # LOCAL_MULTILIB is both endif # TARGET_2ND_ARCH endif # LOCAL_MODULE_CLASS @@ -263,7 +270,7 @@ ifdef LOCAL_DEX_PREOPT my_dexpreopt_deps += \ $(foreach lib, $(my_dexpreopt_libs), \ $(call intermediates-dir-for,JAVA_LIBRARIES,$(lib),,COMMON)/javalib.jar) - my_dexpreopt_deps += $(my_dexpreopt_images) + my_dexpreopt_deps += $(my_dexpreopt_images_deps) my_dexpreopt_deps += $(DEXPREOPT_BOOTCLASSPATH_DEX_FILES) $(my_dexpreopt_zip): PRIVATE_MODULE := $(LOCAL_MODULE)