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/target/product/base.mk b/target/product/base.mk
index 84feaf7..a3d8f7e 100644
--- a/target/product/base.mk
+++ b/target/product/base.mk
@@ -158,5 +158,9 @@
 PRODUCT_COPY_FILES += $(call add-to-product-copy-files-if-exists,\
     frameworks/base/compiled-classes:system/etc/compiled-classes)
 
+# Note: it is acceptable to not have a dirty-image-objects file. In that case, the special bin
+#       for known dirty objects in the image will be empty.
+PRODUCT_COPY_FILES += $(call add-to-product-copy-files-if-exists,\
+    frameworks/base/dirty-image-objects:system/etc/dirty-image-objects)
 
 $(call inherit-product, $(SRC_TARGET_DIR)/product/embedded.mk)