Merge "Add warning message for java6 builds."
diff --git a/core/64_bit_blacklist.mk b/core/64_bit_blacklist.mk
index 9039f13..5ad7b51 100644
--- a/core/64_bit_blacklist.mk
+++ b/core/64_bit_blacklist.mk
@@ -2,10 +2,8 @@
 
 # JNI - needs 64-bit VM
 _64_bit_directory_blacklist += \
-        external/svox/ \
         packages/
 
-
 # Chromium/V8: needs 64-bit support
 _64_bit_directory_blacklist += \
 	external/chromium-libpac \
@@ -18,12 +16,6 @@
 	device/generic/goldfish/opengl \
 	device/generic/goldfish/camera \
 
-# depends on frameworks/av
-_64_bit_directory_blacklist += \
-	external/srec \
-	frameworks/opt \
-	frameworks/ex \
-
 # not needed yet, and too many directories to blacklist individually
 _64_bit_directory_blacklist += \
 	frameworks/av/media/libeffects \
diff --git a/core/config.mk b/core/config.mk
index e9884be..b6a8fd9 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -458,6 +458,11 @@
   TARGET_DEFAULT_JAVA_LIBRARIES := core core-junit ext framework framework2
 endif
 
+DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES := default
+ifneq (,$(filter $(TARGET_CPU_VARIANT),cortex-a15 krait))
+DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES := div
+endif
+
 # define clang/llvm tools and global flags
 include $(BUILD_SYSTEM)/clang/config.mk
 
diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk
index 160f128..4918a2b 100644
--- a/core/dex_preopt.mk
+++ b/core/dex_preopt.mk
@@ -3,9 +3,7 @@
 #
 ####################################
 
-ifeq ($(DALVIK_VM_LIB),)
-$(error No value for DALVIK_VM_LIB)
-endif
+ifneq ($(DALVIK_VM_LIB),)
 
 # list of boot classpath jars for dexpreopt
 DEXPREOPT_BOOT_JARS := $(subst $(space),:,$(PRODUCT_BOOT_JARS))
@@ -70,3 +68,7 @@
 DEXPREOPT_ONE_FILE_DEPENDENCY_TOOLS := $(DEX2OAT_DEPENDENCY)
 DEXPREOPT_ONE_FILE_DEPENDENCY_BUILT_BOOT_PREOPT := $(DEFAULT_DEX_PREOPT_BUILT_IMAGE)
 endif
+else
+$(warning No DALVIK_VM_LIB, disable dexpreopt.)
+WITH_DEXPREOPT := false
+endif  # DALVIK_VM_LIB is defined.
diff --git a/core/dex_preopt_libart.mk b/core/dex_preopt_libart.mk
index 70ffee9..0318505 100644
--- a/core/dex_preopt_libart.mk
+++ b/core/dex_preopt_libart.mk
@@ -37,11 +37,6 @@
 	$(hide) $(ACP) -fp $(patsubst %.art,%.oat,$<) $(patsubst %.art,%.oat,$@)
 endif
 
-DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES := default
-ifeq ($(TARGET_CPU_VARIANT),$(filter $(TARGET_CPU_VARIANT),cortex-a15 krait))
-DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES := div
-endif
-
 # start of image reserved address space
 LIBART_IMG_HOST_BASE_ADDRESS   := 0x60000000
 
diff --git a/core/main.mk b/core/main.mk
index 4abc43a..6d98e94 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -359,7 +359,7 @@
   # Turn on Dalvik preoptimization for user builds, but only if not
   # explicitly disabled and the build is running on Linux (since host
   # Dalvik isn't built for non-Linux hosts).
-  ifneq (true,$(DISABLE_DEXPREOPT))
+  ifeq (,$(WITH_DEXPREOPT))
     ifeq ($(user_variant),user)
       ifeq ($(HOST_OS),linux)
         WITH_DEXPREOPT := true
diff --git a/target/board/generic_x86/BoardConfig.mk b/target/board/generic_x86/BoardConfig.mk
index db89582..c634bcd 100644
--- a/target/board/generic_x86/BoardConfig.mk
+++ b/target/board/generic_x86/BoardConfig.mk
@@ -24,7 +24,7 @@
 # Enable dex-preoptimization to speed up the first boot sequence
 # of an SDK AVD. Note that this operation only works on Linux for now
 ifeq ($(HOST_OS),linux)
-WITH_DEXPREOPT := true
+WITH_DEXPREOPT ?= true
 endif
 
 # Build OpenGLES emulation host and guest libraries
diff --git a/target/board/generic_x86_64/BoardConfig.mk b/target/board/generic_x86_64/BoardConfig.mk
index b58336a..7f2715e 100755
--- a/target/board/generic_x86_64/BoardConfig.mk
+++ b/target/board/generic_x86_64/BoardConfig.mk
@@ -30,7 +30,7 @@
 # Enable dex-preoptimization to speed up the first boot sequence
 # of an SDK AVD. Note that this operation only works on Linux for now
 ifeq ($(HOST_OS),linux)
-WITH_DEXPREOPT := true
+WITH_DEXPREOPT ?= true
 endif
 
 # disable the emulator
diff --git a/target/board/vbox_x86/BoardConfig.mk b/target/board/vbox_x86/BoardConfig.mk
index 815ad9e..e5a1d3e 100644
--- a/target/board/vbox_x86/BoardConfig.mk
+++ b/target/board/vbox_x86/BoardConfig.mk
@@ -3,7 +3,6 @@
 #
 
 TARGET_ARCH=x86
-DISABLE_DEXPREOPT := true
 TARGET_COMPRESS_MODULE_SYMBOLS := false
 TARGET_NO_RECOVERY := true
 TARGET_HARDWARE_3D := false
@@ -32,6 +31,7 @@
 # Reserve 265M  for the system partition
 BOARD_SYSTEMIMAGE_PARTITION_SIZE := 268435456
 
+WITH_DEXPREOPT := false
 
 # The eth0 device should be started with dhcp on boot.
 # Useful for emulators that don't provide a wifi connection.
diff --git a/target/product/base.mk b/target/product/base.mk
index f2bef0f..048d737 100644
--- a/target/product/base.mk
+++ b/target/product/base.mk
@@ -34,6 +34,7 @@
     framework2 \
     fsck_msdos \
     ime \
+    input \
     inputflinger \
     javax.obex \
     libandroid \
diff --git a/target/product/embedded.mk b/target/product/embedded.mk
index 599f049..d343d27 100644
--- a/target/product/embedded.mk
+++ b/target/product/embedded.mk
@@ -32,7 +32,6 @@
     init \
     init.environ.rc \
     init.rc \
-    input \
     libEGL \
     libETC1 \
     libFFTEm \