Brian Carlstrom | ced4bff | 2013-11-14 23:44:56 -0800 | [diff] [blame] | 1 | #################################### |
| 2 | # dexpreopt support for ART |
| 3 | # |
| 4 | #################################### |
| 5 | |
Mathieu Chartier | a61acf6 | 2017-06-28 18:23:37 -0700 | [diff] [blame] | 6 | # We want to install the profile even if we are not using preopt since it is required to generate |
| 7 | # the image on the device. |
Colin Cross | 47e384c | 2019-02-11 14:25:13 -0800 | [diff] [blame] | 8 | my_installed := $(call copy-many-files,$(DEXPREOPT_IMAGE_PROFILE_BUILT_INSTALLED),$(PRODUCT_OUT)) |
| 9 | ALL_DEFAULT_INSTALLED_MODULES += $(my_installed) |
Mathieu Chartier | a61acf6 | 2017-06-28 18:23:37 -0700 | [diff] [blame] | 10 | |
Colin Cross | 47e384c | 2019-02-11 14:25:13 -0800 | [diff] [blame] | 11 | # Install primary arch vdex files into a shared location, and then symlink them to both the primary |
| 12 | # and secondary arch directories. |
| 13 | my_vdex_copy_pairs := $(DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_$(TARGET_ARCH)) |
| 14 | my_installed := $(foreach v,$(my_vdex_copy_pairs),$(PRODUCT_OUT)$(call word-colon,2,$(v))) |
| 15 | $(firstword $(my_installed)): $(wordlist 2,9999,$(my_installed)) |
Mathieu Chartier | a61acf6 | 2017-06-28 18:23:37 -0700 | [diff] [blame] | 16 | |
Colin Cross | 47e384c | 2019-02-11 14:25:13 -0800 | [diff] [blame] | 17 | my_built_vdex_dir := $(dir $(call word-colon,1,$(firstword $(my_vdex_copy_pairs)))) |
| 18 | my_installed_vdex_dir := $(PRODUCT_OUT)$(dir $(call word-colon,2,$(firstword $(my_vdex_copy_pairs)))) |
bowen_lai | 4570fdb | 2017-08-16 16:28:05 +0800 | [diff] [blame] | 19 | |
Colin Cross | 47e384c | 2019-02-11 14:25:13 -0800 | [diff] [blame] | 20 | $(my_installed): $(my_installed_vdex_dir)% : $(my_built_vdex_dir)% |
bowen_lai | 4570fdb | 2017-08-16 16:28:05 +0800 | [diff] [blame] | 21 | @echo "Install: $@" |
bowen_lai | 4570fdb | 2017-08-16 16:28:05 +0800 | [diff] [blame] | 22 | @rm -f $@ |
Colin Cross | 47e384c | 2019-02-11 14:25:13 -0800 | [diff] [blame] | 23 | $(copy-file-to-target) |
| 24 | mkdir -p $(dir $@)/$(TARGET_ARCH) |
| 25 | ln -sfn ../$(notdir $@) $(dir $@)/$(TARGET_ARCH) |
| 26 | ifdef TARGET_2ND_ARCH |
| 27 | ifneq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
| 28 | mkdir -p $(dir $@)/$(TARGET_2ND_ARCH) |
| 29 | ln -sfn ../$(notdir $@) $(dir $@)/$(TARGET_2ND_ARCH) |
| 30 | endif |
| 31 | endif |
| 32 | |
| 33 | my_dexpreopt_image_extra_deps := $(firstword $(my_installed)) |
bowen_lai | 4570fdb | 2017-08-16 16:28:05 +0800 | [diff] [blame] | 34 | |
| 35 | my_2nd_arch_prefix := |
Colin Cross | 47e384c | 2019-02-11 14:25:13 -0800 | [diff] [blame] | 36 | include $(BUILD_SYSTEM)/dex_preopt_libart_boot.mk |
| 37 | |
| 38 | ifdef TARGET_2ND_ARCH |
| 39 | ifneq ($(TARGET_TRANSLATE_2ND_ARCH),true) |
| 40 | my_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX) |
| 41 | include $(BUILD_SYSTEM)/dex_preopt_libart_boot.mk |
| 42 | endif |
| 43 | endif |
| 44 | |
| 45 | my_2nd_arch_prefix := |
| 46 | |
| 47 | |
| 48 | my_vdex_copy_pairs := |
| 49 | my_installed := |
| 50 | my_built_vdex_dir := |
| 51 | my_installed_vdex_dir := |
| 52 | my_dexpreopt_image_extra_deps := |