diff options
author | Mathieu Chartier | 2018-06-19 18:05:49 -0500 |
---|---|---|
committer | Mathieu Chartier | 2018-07-11 16:29:16 -0500 |
commit | 25f9aa8c4b2753f23acd7476259956d079d8b2f3 (patch) | |
tree | 36e609b3b4092c307fe914d253b7cfa8c524b966 /core/dex_preopt_odex_install.mk | |
parent | f1429b1c31511c5675bced83c94cab6013bd5099 (diff) | |
download | platform-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.mk | 21 |
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 | |||
192 | else # boot jar | 197 | else # boot jar |
193 | ifeq ($(LOCAL_MODULE_CLASS),JAVA_LIBRARIES) | 198 | ifeq ($(LOCAL_MODULE_CLASS),JAVA_LIBRARIES) |
194 | 199 | ||
195 | my_module_multilib := $(LOCAL_MULTILIB) | 200 | # Use my_module_dexpreopt_multilib since my_module_multilib is modified in included files below. |
201 | my_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. |
197 | my_filtered_lib_name := $(patsubst %.impl,%,$(LOCAL_MODULE)) | 203 | my_filtered_lib_name := $(patsubst %.impl,%,$(LOCAL_MODULE)) |
198 | ifeq (,$(filter $(JAVA_SDK_LIBRARIES),$(my_filtered_lib_name))) | 204 | ifeq (,$(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". |
201 | ifneq (,$(filter $(PRODUCT_SYSTEM_SERVER_JARS),$(LOCAL_MODULE))) | 207 | ifneq (,$(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". |
203 | my_module_multilib := first | 209 | my_module_dexpreopt_multilib := first |
210 | endif | ||
204 | endif | 211 | endif |
212 | |||
213 | # Only preopt primary arch for translated arch since there is only an image there. | ||
214 | ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) | ||
215 | my_module_dexpreopt_multilib := first | ||
205 | endif | 216 | endif |
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 |
213 | ifdef TARGET_2ND_ARCH | 224 | ifdef TARGET_2ND_ARCH |
214 | ifneq ($(TARGET_TRANSLATE_2ND_ARCH),true) | 225 | ifneq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
215 | ifneq (first,$(my_module_multilib)) | 226 | ifneq (first,$(my_module_dexpreopt_multilib)) |
216 | my_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX) | 227 | my_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX) |
217 | include $(BUILD_SYSTEM)/setup_one_odex.mk | 228 | include $(BUILD_SYSTEM)/setup_one_odex.mk |
218 | endif # my_module_multilib is not first. | 229 | endif # my_module_dexpreopt_multilib is not first. |
219 | endif # TARGET_TRANSLATE_2ND_ARCH not true | 230 | endif # TARGET_TRANSLATE_2ND_ARCH not true |
220 | endif # TARGET_2ND_ARCH | 231 | endif # TARGET_2ND_ARCH |
221 | # ################################################# | 232 | # ################################################# |
@@ -224,7 +235,7 @@ else # must be APPS | |||
224 | my_2nd_arch_prefix := $(LOCAL_2ND_ARCH_VAR_PREFIX) | 235 | my_2nd_arch_prefix := $(LOCAL_2ND_ARCH_VAR_PREFIX) |
225 | include $(BUILD_SYSTEM)/setup_one_odex.mk | 236 | include $(BUILD_SYSTEM)/setup_one_odex.mk |
226 | ifdef TARGET_2ND_ARCH | 237 | ifdef TARGET_2ND_ARCH |
227 | ifeq ($(LOCAL_MULTILIB),both) | 238 | ifeq ($(my_module_dexpreopt_multilib),both) |
228 | # The non-preferred arch | 239 | # The non-preferred arch |
229 | my_2nd_arch_prefix := $(if $(LOCAL_2ND_ARCH_VAR_PREFIX),,$(TARGET_2ND_ARCH_VAR_PREFIX)) | 240 | my_2nd_arch_prefix := $(if $(LOCAL_2ND_ARCH_VAR_PREFIX),,$(TARGET_2ND_ARCH_VAR_PREFIX)) |
230 | include $(BUILD_SYSTEM)/setup_one_odex.mk | 241 | include $(BUILD_SYSTEM)/setup_one_odex.mk |