From 19ed3a0db73b1417446b9b16d894e42926b49cb1 Mon Sep 17 00:00:00 2001 From: Ulya Trafimovich Date: Mon, 10 Feb 2020 15:27:45 +0000 Subject: [PATCH] Make PRODUCT_BOOT_JARS and PRODUCT_UPDATABLE_BOOT_JARS disjoint. This is to unify boot jars with system server jars: PRODUCT_SYSTEM_SERVER_JARS and PRODUCT_UPDATABLE_SYSTEM_SERVER_JARS do not overlap. Test: walleye-userdebug boots Bug: 146363577 Change-Id: Ief8994cc34cb6f7951051313dd66a1334a3a73b4 --- core/product_config.mk | 6 +++--- core/soong_config.mk | 1 + core/tasks/boot_jars_package_check.mk | 6 +----- target/product/base_system.mk | 11 +---------- 4 files changed, 6 insertions(+), 18 deletions(-) diff --git a/core/product_config.mk b/core/product_config.mk index 47492c2ee..1af66e9a0 100644 --- a/core/product_config.mk +++ b/core/product_config.mk @@ -265,9 +265,9 @@ ifdef PRODUCT_DEFAULT_DEV_CERTIFICATE endif $(foreach pair,$(PRODUCT_UPDATABLE_BOOT_JARS), \ - $(if $(findstring $(call word-colon,2,$(pair)),$(PRODUCT_BOOT_JARS)),, \ - $(error Every jar in PRODUCT_UPDATABLE_BOOT_JARS must also be in PRODUCT_BOOT_JARS, \ - $(call word-colon,2,$(pair)) is not) \ + $(if $(findstring $(call word-colon,2,$(pair)),$(PRODUCT_BOOT_JARS)), \ + $(error A jar in PRODUCT_UPDATABLE_BOOT_JARS must not be in PRODUCT_BOOT_JARS, \ + but $(call word-colon,2,$(pair)) is) \ ) \ ) diff --git a/core/soong_config.mk b/core/soong_config.mk index e247a913d..d6248432c 100644 --- a/core/soong_config.mk +++ b/core/soong_config.mk @@ -138,6 +138,7 @@ $(call add_json_bool, UncompressPrivAppDex, $(call invert_bool,$(fi $(call add_json_list, ModulesLoadedByPrivilegedModules, $(PRODUCT_LOADED_BY_PRIVILEGED_MODULES)) $(call add_json_list, BootJars, $(PRODUCT_BOOT_JARS)) +$(call add_json_list, UpdatableBootJars, $(PRODUCT_UPDATABLE_BOOT_JARS)) $(call add_json_bool, VndkUseCoreVariant, $(TARGET_VNDK_USE_CORE_VARIANT)) $(call add_json_bool, VndkSnapshotBuildArtifacts, $(VNDK_SNAPSHOT_BUILD_ARTIFACTS)) diff --git a/core/tasks/boot_jars_package_check.mk b/core/tasks/boot_jars_package_check.mk index ceaff54b8..05243e53b 100644 --- a/core/tasks/boot_jars_package_check.mk +++ b/core/tasks/boot_jars_package_check.mk @@ -32,11 +32,7 @@ updatable_boot_jars := $(foreach pair,$(PRODUCT_UPDATABLE_BOOT_JARS),\ #TODO(jiyong) merge art_boot_jars into updatable_boot_jars art_boot_jars := $(addsuffix .com.android.art.release,$(filter $(ART_APEX_JARS),$(PRODUCT_BOOT_JARS))) -platform_boot_jars := $(filter-out \ - $(ART_APEX_JARS)\ - $(foreach pair,$(PRODUCT_UPDATABLE_BOOT_JARS),$(call word-colon,2,$(pair))),\ - $(PRODUCT_BOOT_JARS)\ -) +platform_boot_jars := $(filter-out $(ART_APEX_JARS),$(PRODUCT_BOOT_JARS)) built_boot_jars := $(foreach j, $(updatable_boot_jars) $(art_boot_jars) $(platform_boot_jars), \ $(call intermediates-dir-for, JAVA_LIBRARIES, $(j),,COMMON)/classes.jar) diff --git a/target/product/base_system.mk b/target/product/base_system.mk index 24bbd1a34..04808ae48 100644 --- a/target/product/base_system.mk +++ b/target/product/base_system.mk @@ -323,21 +323,12 @@ endif # The order matters for runtime class lookup performance. PRODUCT_BOOT_JARS := \ - $(TARGET_CORE_JARS) \ + $(ART_APEX_JARS) \ framework-minus-apex \ ext \ telephony-common \ voip-common \ ims-common \ - framework-sdkextensions \ - framework-statsd \ - ike \ - updatable-media \ - framework-mediaprovider \ - framework-permission \ - framework-appsearch \ - framework-wifi \ - framework-tethering \ framework-telephony PRODUCT_UPDATABLE_BOOT_JARS := \