diff options
author | Mathieu Chartier | 2018-07-12 20:17:54 -0500 |
---|---|---|
committer | Mathieu Chartier | 2018-07-16 21:36:24 -0500 |
commit | fd5dfb817cb2242aa31efc1ad7e3e20231a87817 (patch) | |
tree | 56ee998f2336879c2f056e57ae0996a5619413ec /core/dex_preopt_odex_install.mk | |
parent | 25e4495de179eb606ab756de5783dbd9d81dac5b (diff) | |
download | platform-build-fd5dfb817cb2242aa31efc1ad7e3e20231a87817.tar.gz platform-build-fd5dfb817cb2242aa31efc1ad7e3e20231a87817.tar.xz platform-build-fd5dfb817cb2242aa31efc1ad7e3e20231a87817.zip |
Revert "Revert "Default to nostripping for non /system preopt""
Added logic to not preopt tests. Re-enabled usage of
my_module_multilib since this is referenced in setup_one_odex.
Bug: 110156979
Test: make
Test: forrest first boot tests
This reverts commit 9234def3135cbd5ab40181ce7c021f609d402ab8.
Change-Id: I6a6ea2cd0024c33c0cfbd60f3a1f4ad5b1609dc8
Diffstat (limited to 'core/dex_preopt_odex_install.mk')
-rw-r--r-- | core/dex_preopt_odex_install.mk | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/core/dex_preopt_odex_install.mk b/core/dex_preopt_odex_install.mk index 358502688..208647ef0 100644 --- a/core/dex_preopt_odex_install.mk +++ b/core/dex_preopt_odex_install.mk | |||
@@ -34,6 +34,14 @@ 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 | # Also only enable preopt for non tests. | ||
42 | ifeq (,$(filter $(LOCAL_MODULE_TAGS),tests)) | ||
43 | LOCAL_DEX_PREOPT := nostripping | ||
44 | endif | ||
37 | endif # Installed to system.img. | 45 | endif # Installed to system.img. |
38 | endif # LOCAL_DEX_PREOPT undefined | 46 | endif # LOCAL_DEX_PREOPT undefined |
39 | endif # TARGET_BUILD_APPS empty | 47 | endif # TARGET_BUILD_APPS empty |
@@ -204,6 +212,11 @@ my_module_multilib := first | |||
204 | endif | 212 | endif |
205 | endif | 213 | endif |
206 | 214 | ||
215 | # Only preopt primary arch for translated arch since there is only an image there. | ||
216 | ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) | ||
217 | my_module_multilib := first | ||
218 | endif | ||
219 | |||
207 | # ################################################# | 220 | # ################################################# |
208 | # Odex for the 1st arch | 221 | # Odex for the 1st arch |
209 | my_2nd_arch_prefix := | 222 | my_2nd_arch_prefix := |
@@ -222,9 +235,12 @@ endif # TARGET_2ND_ARCH | |||
222 | else # must be APPS | 235 | else # must be APPS |
223 | # The preferred arch | 236 | # The preferred arch |
224 | my_2nd_arch_prefix := $(LOCAL_2ND_ARCH_VAR_PREFIX) | 237 | my_2nd_arch_prefix := $(LOCAL_2ND_ARCH_VAR_PREFIX) |
238 | # Save the module multilib since setup_one_odex modifies it. | ||
239 | saved_my_module_multilib := $(my_module_multilib) | ||
225 | include $(BUILD_SYSTEM)/setup_one_odex.mk | 240 | include $(BUILD_SYSTEM)/setup_one_odex.mk |
241 | my_module_multilib := $(saved_my_module_multilib) | ||
226 | ifdef TARGET_2ND_ARCH | 242 | ifdef TARGET_2ND_ARCH |
227 | ifeq ($(LOCAL_MULTILIB),both) | 243 | ifeq ($(my_module_multilib),both) |
228 | # The non-preferred arch | 244 | # The non-preferred arch |
229 | my_2nd_arch_prefix := $(if $(LOCAL_2ND_ARCH_VAR_PREFIX),,$(TARGET_2ND_ARCH_VAR_PREFIX)) | 245 | my_2nd_arch_prefix := $(if $(LOCAL_2ND_ARCH_VAR_PREFIX),,$(TARGET_2ND_ARCH_VAR_PREFIX)) |
230 | include $(BUILD_SYSTEM)/setup_one_odex.mk | 246 | include $(BUILD_SYSTEM)/setup_one_odex.mk |