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