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.

(cherry-picked from commit 865d54caf29acbf576b70428da015a38603dec8e)

Bug: 62554875
Test: mm test-art-host

Merged-In: I2486d2704d74a192f1ecdc02589e569b61efa4ae
Change-Id: I2486d2704d74a192f1ecdc02589e569b61efa4ae
diff --git a/core/dex_preopt_libart.mk b/core/dex_preopt_libart.mk
index 47fdba6..44a05fe 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