Add dirty-images-objects handling to boot image build.
Allows grouping of classes with dirty static fields to be grouped
together in the image to have fewer dirty pages.
Bug: 62554875
Test: mm test-art-host
(cherry picked from commit 865d54caf29acbf576b70428da015a38603dec8e)
Change-Id: Id711ad1c2d98b12b0f55a29acca8a96834d69ede
diff --git a/core/dex_preopt_libart.mk b/core/dex_preopt_libart.mk
index 0f2bb86..aa11d15 100644
--- a/core/dex_preopt_libart.mk
+++ b/core/dex_preopt_libart.mk
@@ -25,6 +25,10 @@
COMPILED_CLASSES := $(call word-colon,1,$(firstword \
$(filter %system/etc/compiled-classes,$(PRODUCT_COPY_FILES))))
+# Use the first dirty-image-objects file in PRODUCT_COPY_FILES.
+DIRTY_IMAGE_OBJECTS := $(call word-colon,1,$(firstword \
+ $(filter %system/etc/dirty-image-objects,$(PRODUCT_COPY_FILES))))
+
define get-product-default-property
$(strip $(patsubst $(1)=%,%,$(filter $(1)=%,$(PRODUCT_DEFAULT_PROPERTY_OVERRIDES))))
endef