summaryrefslogtreecommitdiff
path: root/build/Android.common_test.mk
diff options
context:
space:
mode:
author Richard Uhler <ruhler@google.com> 2015-01-15 09:37:19 -0800
committer Richard Uhler <ruhler@google.com> 2015-03-09 14:46:23 -0700
commit66d874d96d5699bb090c59f47a5a528956ca053e (patch)
treed59bf83a08fead7d9823230831bea63c9e43a62c /build/Android.common_test.mk
parent2cfdabd2bb4833d7092819d27ef08a9e1cdffead (diff)
Create OatFileAssistant class for assisting with oat files.
The oat file assistant is used for determining whether dex2oat or patchoat is needed, for running dex2oat or patchoat as needed to make an oat file up to date, and to load dex files associated with a given dex location. The introduction of the OatFileAssistant class is meant to clean up and consolidate code related to the management of oat files that was duplicated and spread across dalvik_system_DexFile.cc and class_linker.cc. Bug: 11301553 Change-Id: I0c16027b9bae4570c2c50faa9c14f581c0cbafb8
Diffstat (limited to 'build/Android.common_test.mk')
-rw-r--r--build/Android.common_test.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/build/Android.common_test.mk b/build/Android.common_test.mk
index b536fe4a4d..c750399387 100644
--- a/build/Android.common_test.mk
+++ b/build/Android.common_test.mk
@@ -160,6 +160,10 @@ endef
# $(4): additional dependencies
# $(5): a make variable used to collate target dependencies, e.g ART_TEST_TARGET_OAT_HelloWorld_DEX
# $(6): a make variable used to collate host dependencies, e.g ART_TEST_HOST_OAT_HelloWorld_DEX
+#
+# If the input test directory contains a file called main.list, then a
+# multi-dex file is created passing main.list as the --main-dex-list argument
+# to dx.
define build-art-test-dex
ifeq ($(ART_BUILD_TARGET),true)
include $(CLEAR_VARS)
@@ -172,6 +176,9 @@ define build-art-test-dex
LOCAL_JAVA_LIBRARIES := $(TARGET_CORE_JARS)
LOCAL_MODULE_PATH := $(3)
LOCAL_DEX_PREOPT_IMAGE_LOCATION := $(TARGET_CORE_IMG_OUT)
+ ifneq ($(wildcard $(LOCAL_PATH)/$(2)/main.list),)
+ LOCAL_DX_FLAGS := --multi-dex --main-dex-list=$(LOCAL_PATH)/$(2)/main.list --minimal-main-dex
+ endif
include $(BUILD_JAVA_LIBRARY)
$(5) := $$(LOCAL_INSTALLED_MODULE)
endif
@@ -184,6 +191,9 @@ define build-art-test-dex
LOCAL_ADDITIONAL_DEPENDENCIES := art/build/Android.common_test.mk $(4)
LOCAL_JAVA_LIBRARIES := $(HOST_CORE_JARS)
LOCAL_DEX_PREOPT_IMAGE := $(HOST_CORE_IMG_LOCATION)
+ ifneq ($(wildcard $(LOCAL_PATH)/$(2)/main.list),)
+ LOCAL_DX_FLAGS := --multi-dex --main-dex-list=$(LOCAL_PATH)/$(2)/main.list --minimal-main-dex
+ endif
include $(BUILD_HOST_DALVIK_JAVA_LIBRARY)
$(6) := $$(LOCAL_INSTALLED_MODULE)
endif