diff options
author | 2019-10-28 20:07:57 +0000 | |
---|---|---|
committer | 2019-10-30 16:25:19 +0000 | |
commit | c7c4a766f094ed9f7449539f93c2c278a967af35 (patch) | |
tree | ac94ecd8faa33dc880537a289d4f2fef8df6a76e | |
parent | 10954b52ee068988ce8245a05033ed2fcdf81c4b (diff) |
Reland "Remove Core Library JARs from `/system/framework`."
These JARs are part of the ART APEX, and are now located in
`/apex/com.android.art/javalib`. Remove the supernumerary copies in
`/system/framework` and save ~11 MiB on the system partition.
This change no longer breaks coverage builds, as module
`jacocoagent` has been removed from `TARGET_CORE_JARS` in CL
https://android-review.googlesource.com/c/platform/build/+/1151464.
This reverts commit 7c39368927ca6226e6071a9f0613945ee0755268.
Test: Device boot test
Test: Check that:
export EMMA_INSTRUMENT=true
&& unset EMMA_INSTRUMENT_STATIC
&& m installclean
&& m systemimage
generates a system image that contains these files:
/system/framework/apex-jacocoagent.vdex
/system/framework/boot-jacocoagent.vdex
/system/framework/jacocoagent.jar
/system/framework/<arch>/apex-jacocoagent.art
/system/framework/<arch>/apex-jacocoagent.oat
/system/framework/<arch>/apex-jacocoagent.vdex
/system/framework/<arch>/boot-jacocoagent.art
/system/framework/<arch>/boot-jacocoagent.oat
/system/framework/<arch>/boot-jacocoagent.vdex
Test: Run test ATP test avd/avd_boot_health_check on build target
cf_x86_phone-userdebug_coverage
Bug: 142944799
Bug: 143304991
Change-Id: Ifdb2331c5dcb992adbfd6c5a3983d8b9b13d16b2
-rw-r--r-- | CleanSpec.mk | 4 | ||||
-rw-r--r-- | core/main.mk | 2 | ||||
-rw-r--r-- | target/product/runtime_libart.mk | 8 |
3 files changed, 9 insertions, 5 deletions
diff --git a/CleanSpec.mk b/CleanSpec.mk index ee38a74644..6c5ecd901d 100644 --- a/CleanSpec.mk +++ b/CleanSpec.mk @@ -695,6 +695,10 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/vndk-*) # Switch to symlinks for VNDK libs $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/vndk-*) +# Remove Android Core Library artifacts from the system partition +# again, as the original change removing them was reverted. +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/framework/*.jar) + # ************************************************ # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST # ************************************************ diff --git a/core/main.mk b/core/main.mk index 29c5a4ccb7..a5e2456156 100644 --- a/core/main.mk +++ b/core/main.mk @@ -1253,6 +1253,8 @@ else endef endif +# TODO(b/142944799): Implement Java library absence check for Core Libraries. + ifdef FULL_BUILD ifneq (true,$(ALLOW_MISSING_DEPENDENCIES)) # Check to ensure that all modules in PRODUCT_PACKAGES exist (opt in per product) diff --git a/target/product/runtime_libart.mk b/target/product/runtime_libart.mk index 581a72be52..b8cb2ff097 100644 --- a/target/product/runtime_libart.mk +++ b/target/product/runtime_libart.mk @@ -20,11 +20,6 @@ ifeq ($(TARGET_CORE_JARS),) $(error TARGET_CORE_JARS is empty; cannot update PRODUCT_PACKAGES variable) endif -# Minimal boot classpath. This should be a subset of PRODUCT_BOOT_JARS, and equivalent to -# TARGET_CORE_JARS. -PRODUCT_PACKAGES += \ - $(TARGET_CORE_JARS) - # Additional mixins to the boot classpath. PRODUCT_PACKAGES += \ android.test.base \ @@ -37,6 +32,9 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += com.android.runtime # ART APEX module. +# Note that this package includes the minimal boot classpath JARs (listed in +# TARGET_CORE_JARS), which should no longer be added directly to +# PRODUCT_PACKAGES. PRODUCT_PACKAGES += com.android.art PRODUCT_HOST_PACKAGES += com.android.art |