Enable WITH_DEXPREOPT on devices where it is possible

Change-Id: I0ea9768f801865f95f2774b8377cc8f3d75e30bf
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 334207a..4ada405 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -124,6 +124,15 @@
 TARGET_SUPPORTS_64_BIT_APPS := true
 endif
 
+# Enable dex-preoptimization to speed up first boot sequence
+ifeq ($(HOST_OS),linux)
+  ifeq ($(TARGET_BUILD_VARIANT),user)
+    ifeq ($(WITH_DEXPREOPT),)
+      WITH_DEXPREOPT := true
+    endif
+  endif
+endif
+
 TARGET_RELEASETOOLS_EXTENSIONS := device/htc/flounder
 
 # Include an expanded selection of fonts