Revert "Use dx.jar directly"
This reverts commit e37a3c959a
.
Reason for revert: breaks art test runner
Change-Id: Ice0cd3020ddec7f31eb789867a45f047a75a05d0
This commit is contained in:
parent
e37a3c959a
commit
e44e75aa89
|
@ -499,11 +499,6 @@ prebuilt_sdk_tools_bin := $(prebuilt_sdk_tools)/$(HOST_OS)/bin
|
|||
|
||||
USE_PREBUILT_SDK_TOOLS_IN_PLACE := true
|
||||
|
||||
# TODO(ccross): remove this once the build server no longer references it
|
||||
ifdef DX_ALT_JAR
|
||||
DX_JAR := DX_ALT_JAR
|
||||
endif
|
||||
|
||||
#
|
||||
# Tools that are prebuilts for TARGET_BUILD_APPS
|
||||
#
|
||||
|
@ -511,16 +506,24 @@ ifeq (,$(TARGET_BUILD_APPS)$(filter true,$(TARGET_BUILD_PDK)))
|
|||
AIDL := $(HOST_OUT_EXECUTABLES)/aidl
|
||||
AAPT := $(HOST_OUT_EXECUTABLES)/aapt
|
||||
AAPT2 := $(HOST_OUT_EXECUTABLES)/aapt2
|
||||
DX_JAR ?= $(HOST_OUT_JAVA_LIBRARIES)/dx.jar
|
||||
MAINDEXCLASSES := $(HOST_OUT_EXECUTABLES)/mainDexClasses
|
||||
SIGNAPK_JAR := $(HOST_OUT_JAVA_LIBRARIES)/signapk$(COMMON_JAVA_PACKAGE_SUFFIX)
|
||||
SIGNAPK_JNI_LIBRARY_PATH := $(HOST_OUT_SHARED_LIBRARIES)
|
||||
ZIPALIGN := $(HOST_OUT_EXECUTABLES)/zipalign
|
||||
|
||||
ifndef DX_ALT_JAR
|
||||
DX := $(HOST_OUT_EXECUTABLES)/dx
|
||||
DX_COMMAND := $(DX) -JXms16M -JXmx2048M
|
||||
else
|
||||
DX := $(DX_ALT_JAR)
|
||||
DX_COMMAND := $(JAVA) -Xms16M -Xmx2048M -jar $(DX)
|
||||
endif
|
||||
else # TARGET_BUILD_APPS || TARGET_BUILD_PDK
|
||||
AIDL := $(prebuilt_sdk_tools_bin)/aidl
|
||||
AAPT := $(prebuilt_sdk_tools_bin)/aapt
|
||||
AAPT2 := $(prebuilt_sdk_tools_bin)/aapt2
|
||||
DX_JAR ?= $(prebuilt_sdk_tools)/lib/dx.jar
|
||||
DX := $(prebuilt_sdk_tools)/dx
|
||||
DX_COMMAND := $(DX) -JXms16M -JXmx2048M
|
||||
MAINDEXCLASSES := $(prebuilt_sdk_tools)/mainDexClasses
|
||||
ZIPALIGN := $(prebuilt_sdk_tools_bin)/zipalign
|
||||
SIGNAPK_JAR := $(prebuilt_sdk_tools)/lib/signapk$(COMMON_JAVA_PACKAGE_SUFFIX)
|
||||
|
@ -558,16 +561,6 @@ SOONG_ZIP := $(SOONG_HOST_OUT_EXECUTABLES)/soong_zip
|
|||
ZIP2ZIP := $(SOONG_HOST_OUT_EXECUTABLES)/zip2zip
|
||||
ZIPTIME := $(prebuilt_build_tools_bin)/ziptime
|
||||
|
||||
# DX can be overriden on the command line
|
||||
ifndef DX
|
||||
#TODO: use a smaller -Xmx value for most libraries;
|
||||
# only core.jar and framework.jar need a heap this big.
|
||||
DX := $(JAVA) -Xms16M -Xmx2048M -jar $(DX_JAR)
|
||||
DX_DEPS := $(DX_JAR)
|
||||
else
|
||||
DX_DEPS ?= $(DX)
|
||||
endif
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# Generic tools.
|
||||
JACK := $(HOST_OUT_EXECUTABLES)/jack
|
||||
|
|
|
@ -2557,7 +2557,7 @@ define transform-classes.jar-to-dex
|
|||
@echo "target Dex: $(PRIVATE_MODULE)"
|
||||
@mkdir -p $(dir $@)
|
||||
$(hide) rm -f $(dir $@)classes*.dex
|
||||
$(hide) $(DX) \
|
||||
$(hide) $(DX_COMMAND) \
|
||||
--dex --output=$(dir $@) \
|
||||
--min-sdk-version=$(call codename-or-sdk-to-sdk,$(PRIVATE_DEFAULT_APP_TARGET_SDK)) \
|
||||
$(if $(NO_OPTIMIZE_DX), \
|
||||
|
|
|
@ -136,7 +136,7 @@ $(LOCAL_BUILT_MODULE) : $(full_classes_jar)
|
|||
else # !LOCAL_IS_STATIC_JAVA_LIBRARY
|
||||
$(built_dex): PRIVATE_INTERMEDIATES_DIR := $(intermediates.COMMON)
|
||||
$(built_dex): PRIVATE_DX_FLAGS := $(LOCAL_DX_FLAGS)
|
||||
$(built_dex): $(full_classes_jar) $(DX_DEPS)
|
||||
$(built_dex): $(full_classes_jar) $(DX)
|
||||
$(transform-classes.jar-to-dex)
|
||||
|
||||
$(LOCAL_BUILT_MODULE): PRIVATE_DEX_FILE := $(built_dex)
|
||||
|
|
|
@ -673,7 +673,7 @@ $(built_dex_intermediate): PRIVATE_DX_FLAGS := $(LOCAL_DX_FLAGS)
|
|||
ifeq ($(LOCAL_EMMA_INSTRUMENT),true)
|
||||
$(built_dex_intermediate): PRIVATE_DX_FLAGS += --no-locals
|
||||
endif
|
||||
$(built_dex_intermediate): $(full_classes_jar) $(DX_DEPS)
|
||||
$(built_dex_intermediate): $(full_classes_jar) $(DX)
|
||||
$(transform-classes.jar-to-dex)
|
||||
endif # LOCAL_JACK_ENABLED is disabled
|
||||
|
||||
|
|
Loading…
Reference in New Issue