Add DEXPREOPT support for ART

Change-Id: I24d0d7b2a23a769f5d69bd4dc14be22e1475b759
diff --git a/core/product_config.mk b/core/product_config.mk
index e4b68cf..a2be30b 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -266,6 +266,17 @@
 # Now we can assign to PRODUCT_RUNTIMES
 PRODUCT_RUNTIMES := $(product_runtimes)
 product_runtimes :=
+
+PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PROPERTY_OVERRIDES += persist.sys.dalvik.vm.lib=$(DALVIK_VM_LIB)
+
+ifeq ($(words $(PRODUCT_RUNTIMES)),1)
+  # If we only have one runtime, we can strip classes.dex by default during dex_preopt
+  DEX_PREOPT_DEFAULT := true
+else
+  # If we have more than one, we leave the classes.dex alone for post-boot analysis
+  DEX_PREOPT_DEFAULT := nostripping
+endif
+
 #############################################################################
 
 # A list of module names of BOOTCLASSPATH (jar files)