Merge "Build: Only use compiled-classes file when available" into nyc-dev
diff --git a/target/product/core_minimal.mk b/target/product/core_minimal.mk
index 7504d01..91d5d26 100644
--- a/target/product/core_minimal.mk
+++ b/target/product/core_minimal.mk
@@ -142,8 +142,8 @@
     pm.dexopt.forced-dexopt=speed
 
 # Enable boot.oat filtering of compiled classes to reduce boot.oat size. b/28026683
-PRODUCT_COPY_FILES += \
-    frameworks/base/compiled-classes-phone:system/etc/compiled-classes
+PRODUCT_COPY_FILES += $(call add-to-product-copy-files-if-exists,\
+    frameworks/base/compiled-classes-phone:system/etc/compiled-classes)
 
 $(call inherit-product, $(SRC_TARGET_DIR)/product/runtime_libart.mk)
 $(call inherit-product, $(SRC_TARGET_DIR)/product/base.mk)