Merge "Default to "prescott" as our baseline i686 host build architecture."
diff --git a/core/definitions.mk b/core/definitions.mk
index 441c186..177dbc7 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -1671,9 +1671,10 @@
define transform-classes.jar-to-dex
@echo "target Dex: $(PRIVATE_MODULE)"
@mkdir -p $(dir $@)
+$(hide) rm -f $(dir $@)/classes*.dex
$(hide) $(DX) \
$(if $(findstring windows,$(HOST_OS)),,-JXms16M -JXmx2048M) \
- --dex --output=$@ \
+ --dex --output=$(dir $@) \
$(incremental_dex) \
$(if $(NO_OPTIMIZE_DX), \
--no-optimize) \
@@ -1743,11 +1744,7 @@
#TODO: update the manifest to point to the dex file
define add-dex-to-package
-$(if $(filter classes.dex,$(notdir $(PRIVATE_DEX_FILE))),\
-$(hide) zip -qj $@ $(PRIVATE_DEX_FILE),\
-$(hide) _adtp_classes_dex=$(dir $(PRIVATE_DEX_FILE))classes.dex; \
-cp $(PRIVATE_DEX_FILE) $$_adtp_classes_dex && \
-zip -qj $@ $$_adtp_classes_dex && rm -f $$_adtp_classes_dex)
+$(hide) zip -qj $@ $(dir $(PRIVATE_DEX_FILE))/classes*.dex
endef
# Add java resources added by the current module.
diff --git a/core/dex_preopt_libart.mk b/core/dex_preopt_libart.mk
index 8fc0c67..2d9c518 100644
--- a/core/dex_preopt_libart.mk
+++ b/core/dex_preopt_libart.mk
@@ -20,12 +20,7 @@
# start of image reserved address space
LIBART_IMG_HOST_BASE_ADDRESS := 0x60000000
-
-ifeq ($(TARGET_ARCH),mips)
-LIBART_IMG_TARGET_BASE_ADDRESS := 0x30000000
-else
LIBART_IMG_TARGET_BASE_ADDRESS := 0x70000000
-endif
define get-product-default-property
$(strip $(patsubst $(1)=%,%,$(filter $(1)=%,$(PRODUCT_DEFAULT_PROPERTY_OVERRIDES))))
@@ -36,6 +31,17 @@
DEX2OAT_XMS := $(call get-product-default-property,dalvik.vm.dex2oat-Xms)
DEX2OAT_XMX := $(call get-product-default-property,dalvik.vm.dex2oat-Xmx)
+ifeq ($(TARGET_ARCH),mips)
+# MIPS specific overrides.
+# For MIPS the ART image is loaded at a lower address. This causes issues
+# with the image overlapping with memory on the host cross-compiling and
+# building the image. We therefore limit the Xmx value. This isn't done
+# via a property as we want the larger Xmx value if we're running on a
+# MIPS device.
+LIBART_IMG_TARGET_BASE_ADDRESS := 0x30000000
+DEX2OAT_XMX := 128m
+endif
+
########################################################################
# The full system boot classpath
diff --git a/core/java.mk b/core/java.mk
index 8863ac2..049bc51 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -72,10 +72,10 @@
# Choose leaf name for the compiled jar file.
ifeq ($(LOCAL_EMMA_INSTRUMENT),true)
full_classes_compiled_jar_leaf := classes-no-debug-var.jar
-built_dex_intermediate_leaf := classes-no-local.dex
+built_dex_intermediate_leaf := no-local
else
full_classes_compiled_jar_leaf := classes-full-debug.jar
-built_dex_intermediate_leaf := classes-with-local.dex
+built_dex_intermediate_leaf := with-local
endif
ifeq ($(LOCAL_PROGUARD_ENABLED),disabled)
@@ -96,7 +96,7 @@
# only the output directory can be changed
full_classes_emma_jar := $(emma_intermediates_dir)/lib/$(jarjar_leaf)
full_classes_proguard_jar := $(intermediates.COMMON)/$(proguard_jar_leaf)
-built_dex_intermediate := $(intermediates.COMMON)/$(built_dex_intermediate_leaf)
+built_dex_intermediate := $(intermediates.COMMON)/$(built_dex_intermediate_leaf)/classes.dex
full_classes_stubs_jar := $(intermediates.COMMON)/stubs.jar
ifeq ($(LOCAL_MODULE_CLASS)$(LOCAL_SRC_FILES)$(LOCAL_STATIC_JAVA_LIBRARIES)$(LOCAL_SOURCE_FILES_ALL_GENERATED),APPS)
@@ -470,7 +470,9 @@
$(transform-classes.jar-to-dex)
$(built_dex): $(built_dex_intermediate) | $(ACP)
@echo Copying: $@
- $(hide) $(ACP) -fp $< $@
+ $(hide) mkdir -p $(dir $@)
+ $(hide) rm -f $(dir $@)/classes*.dex
+ $(hide) $(ACP) -fp $(dir $<)/classes*.dex $(dir $@)
ifneq ($(GENERATE_DEX_DEBUG),)
$(install-dex-debug)
endif
diff --git a/core/main.mk b/core/main.mk
index c65fe3c..8868768 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -768,10 +768,6 @@
$(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES), \
$(if $(strip $(ALL_MODULES.$(m).INSTALLED) $(ALL_MODULES.$(m)$(TARGET_2ND_ARCH_MODULE_SUFFIX).INSTALLED)),,\
$(eval dangling_modules += $(m))))
- ifneq ($(TARGET_IS_64_BIT),true)
- # We know those 64-bit modules don't exist in the 32-bit SDK build.
- dangling_modules := $(filter-out %64,$(dangling_modules))
- endif
ifneq ($(dangling_modules),)
$(error Module names '$(dangling_modules)' in PRODUCT_PACKAGES has nothing to install!)
endif
diff --git a/core/pathmap.mk b/core/pathmap.mk
index 28661c2..2355a8f 100644
--- a/core/pathmap.mk
+++ b/core/pathmap.mk
@@ -113,15 +113,24 @@
v13
#
+# A list of all source roots under frameworks/multidex.
+#
+FRAMEWORKS_MULTIDEX_SUBDIRS := \
+ multidex \
+ multidex/instrumentation
+
+#
# A version of FRAMEWORKS_SUPPORT_SUBDIRS that is expanded to full paths from
# the root of the tree.
#
FRAMEWORKS_SUPPORT_JAVA_SRC_DIRS := \
- $(addprefix frameworks/support/,$(FRAMEWORKS_SUPPORT_SUBDIRS))
+ $(addprefix frameworks/support/,$(FRAMEWORKS_SUPPORT_SUBDIRS)) \
+ $(addsuffix /src,$(addprefix frameworks/,$(FRAMEWORKS_MULTIDEX_SUBDIRS)))
#
# A list of support library modules.
#
FRAMEWORKS_SUPPORT_JAVA_LIBRARIES := \
- $(foreach dir,$(FRAMEWORKS_SUPPORT_SUBDIRS),android-support-$(subst /,-,$(dir)))
+ $(foreach dir,$(FRAMEWORKS_SUPPORT_SUBDIRS),android-support-$(subst /,-,$(dir))) \
+ $(foreach dir,$(FRAMEWORKS_MULTIDEX_SUBDIRS),android-support-$(subst /,-,$(dir)))
diff --git a/target/product/embedded.mk b/target/product/embedded.mk
index cfac003..29d3ada 100644
--- a/target/product/embedded.mk
+++ b/target/product/embedded.mk
@@ -22,7 +22,6 @@
adbd \
bootanimation \
debuggerd \
- debuggerd64 \
dumpstate \
dumpsys \
gralloc.default \
@@ -56,7 +55,6 @@
libui \
libutils \
linker \
- linker64 \
logcat \
logwrapper \
mkshrc \