blob: 2bfe881e8c3a59e1a9866fdca2e1ac70accb8efb [file] [log] [blame]
Brian Carlstromced4bff2013-11-14 23:44:56 -08001####################################
2# dexpreopt support for ART
3#
4####################################
5
Mathieu Chartiera61acf62017-06-28 18:23:37 -07006# 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 Cross47e384c2019-02-11 14:25:13 -08008my_installed := $(call copy-many-files,$(DEXPREOPT_IMAGE_PROFILE_BUILT_INSTALLED),$(PRODUCT_OUT))
9ALL_DEFAULT_INSTALLED_MODULES += $(my_installed)
Mathieu Chartiera61acf62017-06-28 18:23:37 -070010
Colin Cross47e384c2019-02-11 14:25:13 -080011# Install primary arch vdex files into a shared location, and then symlink them to both the primary
12# and secondary arch directories.
13my_vdex_copy_pairs := $(DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_$(TARGET_ARCH))
14my_installed := $(foreach v,$(my_vdex_copy_pairs),$(PRODUCT_OUT)$(call word-colon,2,$(v)))
15$(firstword $(my_installed)): $(wordlist 2,9999,$(my_installed))
Mathieu Chartiera61acf62017-06-28 18:23:37 -070016
Colin Cross47e384c2019-02-11 14:25:13 -080017my_built_vdex_dir := $(dir $(call word-colon,1,$(firstword $(my_vdex_copy_pairs))))
18my_installed_vdex_dir := $(PRODUCT_OUT)$(dir $(call word-colon,2,$(firstword $(my_vdex_copy_pairs))))
bowen_lai4570fdb2017-08-16 16:28:05 +080019
Colin Cross47e384c2019-02-11 14:25:13 -080020$(my_installed): $(my_installed_vdex_dir)% : $(my_built_vdex_dir)%
bowen_lai4570fdb2017-08-16 16:28:05 +080021 @echo "Install: $@"
bowen_lai4570fdb2017-08-16 16:28:05 +080022 @rm -f $@
Colin Cross47e384c2019-02-11 14:25:13 -080023 $(copy-file-to-target)
24 mkdir -p $(dir $@)/$(TARGET_ARCH)
25 ln -sfn ../$(notdir $@) $(dir $@)/$(TARGET_ARCH)
26ifdef 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
31endif
32
33my_dexpreopt_image_extra_deps := $(firstword $(my_installed))
bowen_lai4570fdb2017-08-16 16:28:05 +080034
35my_2nd_arch_prefix :=
Colin Cross47e384c2019-02-11 14:25:13 -080036include $(BUILD_SYSTEM)/dex_preopt_libart_boot.mk
37
38ifdef 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
43endif
44
45my_2nd_arch_prefix :=
46
47
48my_vdex_copy_pairs :=
49my_installed :=
50my_built_vdex_dir :=
51my_installed_vdex_dir :=
52my_dexpreopt_image_extra_deps :=