blob: d43158ef256654582550475a07f786fab3bfc4cc [file] [log] [blame]
Ying Wange7874c42010-09-17 16:36:06 -07001####################################
Brian Carlstromced4bff2013-11-14 23:44:56 -08002# dexpreopt support - typically used on user builds to run dexopt (for Dalvik) or dex2oat (for ART) ahead of time
Ying Wange7874c42010-09-17 16:36:06 -07003#
4####################################
5
Colin Cross6db5b0e2018-11-16 21:26:33 -08006include $(BUILD_SYSTEM)/dex_preopt_config.mk
Alex Light4e358ab2016-06-16 14:47:10 -07007
Nicolas Geoffraycdd43432017-03-24 14:45:59 +00008# Method returning whether the install path $(1) should be for system_other.
Andreas Gampe4ed21d12017-06-16 10:24:54 -07009# Under SANITIZE_LITE, we do not want system_other. Just put things under /data/asan.
10ifeq ($(SANITIZE_LITE),true)
11install-on-system-other =
12else
Nicolas Geoffray4a0ad4a2017-06-12 15:19:16 +010013install-on-system-other = $(filter-out $(PRODUCT_DEXPREOPT_SPEED_APPS) $(PRODUCT_SYSTEM_SERVER_APPS),$(basename $(notdir $(filter $(foreach f,$(SYSTEM_OTHER_ODEX_FILTER),$(TARGET_OUT)/$(f)),$(1)))))
Andreas Gampe4ed21d12017-06-16 10:24:54 -070014endif
Nicolas Geoffraycdd43432017-03-24 14:45:59 +000015
Nicolas Geoffray269bc742019-02-22 15:33:23 +000016# Install boot images. Note that there can be multiple.
17DEFAULT_DEX_PREOPT_INSTALLED_IMAGE :=
18$(TARGET_2ND_ARCH_VAR_PREFIX)DEFAULT_DEX_PREOPT_INSTALLED_IMAGE :=
19$(foreach my_boot_image_name,$(DEXPREOPT_IMAGE_NAMES),$(eval include $(BUILD_SYSTEM)/dex_preopt_libart.mk))
Brian Carlstromced4bff2013-11-14 23:44:56 -080020
Calin Juravle8955a992018-05-10 11:33:27 -070021boot_profile_jars_zip := $(PRODUCT_OUT)/boot_profile_jars.zip
Colin Crossd8badf52019-02-20 12:39:57 -080022bootclasspath_jars := $(DEXPREOPT_BOOTCLASSPATH_DEX_FILES)
23system_server_jars := $(foreach m,$(PRODUCT_SYSTEM_SERVER_JARS),$(PRODUCT_OUT)/system/framework/$(m).jar)
Calin Juravle8955a992018-05-10 11:33:27 -070024
Colin Crossd8badf52019-02-20 12:39:57 -080025$(boot_profile_jars_zip): PRIVATE_BOOTCLASSPATH_JARS := $(bootclasspath_jars)
26$(boot_profile_jars_zip): PRIVATE_SYSTEM_SERVER_JARS := $(system_server_jars)
27$(boot_profile_jars_zip): $(bootclasspath_jars) $(system_server_jars) $(SOONG_ZIP)
28 @echo "Create boot profiles package: $@"
Calin Juravle8955a992018-05-10 11:33:27 -070029 rm -f $@
Colin Crossd8badf52019-02-20 12:39:57 -080030 $(SOONG_ZIP) -o $@ \
31 -C $(dir $(firstword $(PRIVATE_BOOTCLASSPATH_JARS)))/.. $(addprefix -f ,$(PRIVATE_BOOTCLASSPATH_JARS)) \
32 -C $(PRODUCT_OUT) $(addprefix -f ,$(PRIVATE_SYSTEM_SERVER_JARS))
Calin Juravle8955a992018-05-10 11:33:27 -070033
Colin Crossd8badf52019-02-20 12:39:57 -080034ifeq ($(PRODUCT_DIST_BOOT_AND_SYSTEM_JARS),true)
Calin Juravle8955a992018-05-10 11:33:27 -070035$(call dist-for-goals, droidcore, $(boot_profile_jars_zip))
36endif