aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Chartier2018-06-19 18:05:49 -0500
committerMathieu Chartier2018-07-11 16:29:16 -0500
commit25f9aa8c4b2753f23acd7476259956d079d8b2f3 (patch)
tree36e609b3b4092c307fe914d253b7cfa8c524b966 /core/dex_preopt_odex_install.mk
parentf1429b1c31511c5675bced83c94cab6013bd5099 (diff)
downloadplatform-build-25f9aa8c4b2753f23acd7476259956d079d8b2f3.tar.gz
platform-build-25f9aa8c4b2753f23acd7476259956d079d8b2f3.tar.xz
platform-build-25f9aa8c4b2753f23acd7476259956d079d8b2f3.zip
Default to nostripping for non /system preopt
Enables preopting of product partition apps. Disabled secondary arch preopt for TARGET_TRANSLATE_2ND_ARCH to fix preopt errors for some tests. Test: test-art-host Bug: 110156979 Change-Id: I0370a309913c8a516e01563aef451e7ab5819129
Diffstat (limited to 'core/dex_preopt_odex_install.mk')
-rw-r--r--core/dex_preopt_odex_install.mk21
1 files changed, 16 insertions, 5 deletions
diff --git a/core/dex_preopt_odex_install.mk b/core/dex_preopt_odex_install.mk
index 358502688..66451aa3e 100644
--- a/core/dex_preopt_odex_install.mk
+++ b/core/dex_preopt_odex_install.mk
@@ -34,6 +34,11 @@ else # WITH_DEXPREOPT=true
34 else # LOCAL_APK_LIBRARIES not empty 34 else # LOCAL_APK_LIBRARIES not empty
35 LOCAL_DEX_PREOPT := nostripping 35 LOCAL_DEX_PREOPT := nostripping
36 endif # LOCAL_APK_LIBRARIES not empty 36 endif # LOCAL_APK_LIBRARIES not empty
37 else
38 # Default to nostripping for non system preopt (enables preopt).
39 # Don't strip in case the oat/vdex version in system ROM doesn't match the one in other
40 # partitions. It needs to be able to fall back to the APK for that case.
41 LOCAL_DEX_PREOPT := nostripping
37 endif # Installed to system.img. 42 endif # Installed to system.img.
38 endif # LOCAL_DEX_PREOPT undefined 43 endif # LOCAL_DEX_PREOPT undefined
39 endif # TARGET_BUILD_APPS empty 44 endif # TARGET_BUILD_APPS empty
@@ -192,7 +197,8 @@ installed_odex += $($(TARGET_2ND_ARCH_VAR_PREFIX)DEFAULT_DEX_PREOPT_INSTALLED_IM
192else # boot jar 197else # boot jar
193ifeq ($(LOCAL_MODULE_CLASS),JAVA_LIBRARIES) 198ifeq ($(LOCAL_MODULE_CLASS),JAVA_LIBRARIES)
194 199
195my_module_multilib := $(LOCAL_MULTILIB) 200# Use my_module_dexpreopt_multilib since my_module_multilib is modified in included files below.
201my_module_dexpreopt_multilib := $(LOCAL_MULTILIB)
196# If the module is not an SDK library and it's a system server jar, only preopt the primary arch. 202# If the module is not an SDK library and it's a system server jar, only preopt the primary arch.
197my_filtered_lib_name := $(patsubst %.impl,%,$(LOCAL_MODULE)) 203my_filtered_lib_name := $(patsubst %.impl,%,$(LOCAL_MODULE))
198ifeq (,$(filter $(JAVA_SDK_LIBRARIES),$(my_filtered_lib_name))) 204ifeq (,$(filter $(JAVA_SDK_LIBRARIES),$(my_filtered_lib_name)))
@@ -200,8 +206,13 @@ ifeq (,$(filter $(JAVA_SDK_LIBRARIES),$(my_filtered_lib_name)))
200# But it can be overridden with "LOCAL_MULTILIB := first". 206# But it can be overridden with "LOCAL_MULTILIB := first".
201ifneq (,$(filter $(PRODUCT_SYSTEM_SERVER_JARS),$(LOCAL_MODULE))) 207ifneq (,$(filter $(PRODUCT_SYSTEM_SERVER_JARS),$(LOCAL_MODULE)))
202# For system server jars, we build for only "first". 208# For system server jars, we build for only "first".
203my_module_multilib := first 209my_module_dexpreopt_multilib := first
210endif
204endif 211endif
212
213# Only preopt primary arch for translated arch since there is only an image there.
214ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true)
215my_module_dexpreopt_multilib := first
205endif 216endif
206 217
207# ################################################# 218# #################################################
@@ -212,10 +223,10 @@ include $(BUILD_SYSTEM)/setup_one_odex.mk
212# Odex for the 2nd arch 223# Odex for the 2nd arch
213ifdef TARGET_2ND_ARCH 224ifdef TARGET_2ND_ARCH
214ifneq ($(TARGET_TRANSLATE_2ND_ARCH),true) 225ifneq ($(TARGET_TRANSLATE_2ND_ARCH),true)
215ifneq (first,$(my_module_multilib)) 226ifneq (first,$(my_module_dexpreopt_multilib))
216my_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX) 227my_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX)
217include $(BUILD_SYSTEM)/setup_one_odex.mk 228include $(BUILD_SYSTEM)/setup_one_odex.mk
218endif # my_module_multilib is not first. 229endif # my_module_dexpreopt_multilib is not first.
219endif # TARGET_TRANSLATE_2ND_ARCH not true 230endif # TARGET_TRANSLATE_2ND_ARCH not true
220endif # TARGET_2ND_ARCH 231endif # TARGET_2ND_ARCH
221# ################################################# 232# #################################################
@@ -224,7 +235,7 @@ else # must be APPS
224my_2nd_arch_prefix := $(LOCAL_2ND_ARCH_VAR_PREFIX) 235my_2nd_arch_prefix := $(LOCAL_2ND_ARCH_VAR_PREFIX)
225include $(BUILD_SYSTEM)/setup_one_odex.mk 236include $(BUILD_SYSTEM)/setup_one_odex.mk
226ifdef TARGET_2ND_ARCH 237ifdef TARGET_2ND_ARCH
227ifeq ($(LOCAL_MULTILIB),both) 238ifeq ($(my_module_dexpreopt_multilib),both)
228# The non-preferred arch 239# The non-preferred arch
229my_2nd_arch_prefix := $(if $(LOCAL_2ND_ARCH_VAR_PREFIX),,$(TARGET_2ND_ARCH_VAR_PREFIX)) 240my_2nd_arch_prefix := $(if $(LOCAL_2ND_ARCH_VAR_PREFIX),,$(TARGET_2ND_ARCH_VAR_PREFIX))
230include $(BUILD_SYSTEM)/setup_one_odex.mk 241include $(BUILD_SYSTEM)/setup_one_odex.mk