forked from openkylin/platform_build
Revert "Clean call-jack and its callers"
This reverts commit 5e50b34221
.
Change-Id: Ibf76cc454994c7ad84128ac923d39794d46a04ec
This commit is contained in:
parent
5e50b34221
commit
5863a7cf63
|
@ -752,6 +752,7 @@ endif # LOCAL_SDK_VERSION
|
||||||
endif # TARGET_
|
endif # TARGET_
|
||||||
|
|
||||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_STATIC_JACK_LIBRARIES := $(full_static_jack_libs)
|
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_STATIC_JACK_LIBRARIES := $(full_static_jack_libs)
|
||||||
|
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JACK_VM_ARGS := $(LOCAL_JACK_VM_ARGS)
|
||||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JACK_EXTRA_ARGS := $(LOCAL_JACK_EXTRA_ARGS)
|
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JACK_EXTRA_ARGS := $(LOCAL_JACK_EXTRA_ARGS)
|
||||||
|
|
||||||
ifdef LOCAL_IS_HOST_MODULE
|
ifdef LOCAL_IS_HOST_MODULE
|
||||||
|
|
|
@ -108,6 +108,7 @@ LOCAL_ADDITIONAL_JAVA_DIR:=
|
||||||
LOCAL_ALLOW_UNDEFINED_SYMBOLS:=
|
LOCAL_ALLOW_UNDEFINED_SYMBOLS:=
|
||||||
LOCAL_DX_FLAGS:=
|
LOCAL_DX_FLAGS:=
|
||||||
LOCAL_JACK_ENABLED:=$(DEFAULT_JACK_ENABLED) # '' (ie disabled), disabled, full, incremental
|
LOCAL_JACK_ENABLED:=$(DEFAULT_JACK_ENABLED) # '' (ie disabled), disabled, full, incremental
|
||||||
|
LOCAL_JACK_VM_ARGS := $(DEFAULT_JACK_VM_ARGS)
|
||||||
LOCAL_JACK_EXTRA_ARGS := $(DEFAULT_JACK_EXTRA_ARGS)
|
LOCAL_JACK_EXTRA_ARGS := $(DEFAULT_JACK_EXTRA_ARGS)
|
||||||
LOCAL_JACK_FLAGS:=
|
LOCAL_JACK_FLAGS:=
|
||||||
LOCAL_JILL_FLAGS:=
|
LOCAL_JILL_FLAGS:=
|
||||||
|
|
|
@ -388,7 +388,9 @@ endif
|
||||||
# Generic tools.
|
# Generic tools.
|
||||||
JACK := $(HOST_OUT_EXECUTABLES)/jack
|
JACK := $(HOST_OUT_EXECUTABLES)/jack
|
||||||
JACK_JAR := $(HOST_OUT_JAVA_LIBRARIES)/jack.jar
|
JACK_JAR := $(HOST_OUT_JAVA_LIBRARIES)/jack.jar
|
||||||
|
JACK_LAUNCHER_JAR := $(HOST_OUT_JAVA_LIBRARIES)/jack-launcher.jar
|
||||||
JILL_JAR := $(HOST_OUT_JAVA_LIBRARIES)/jill.jar
|
JILL_JAR := $(HOST_OUT_JAVA_LIBRARIES)/jill.jar
|
||||||
|
JACK_MULTIDEX_DEFAULT_PREPROCESSOR := frameworks/multidex/library/resources/JACK-INF/legacyMultidexInstallation.jpp
|
||||||
|
|
||||||
LEX := prebuilts/misc/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/flex/flex-2.5.39
|
LEX := prebuilts/misc/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/flex/flex-2.5.39
|
||||||
# The default PKGDATADIR built in the prebuilt bison is a relative path
|
# The default PKGDATADIR built in the prebuilt bison is a relative path
|
||||||
|
@ -440,16 +442,26 @@ DEFAULT_JACK_ENABLED:=full
|
||||||
else
|
else
|
||||||
DEFAULT_JACK_ENABLED:=
|
DEFAULT_JACK_ENABLED:=
|
||||||
endif
|
endif
|
||||||
|
ifneq ($(strip $(ANDROID_JACK_VM)),)
|
||||||
|
JACK_VM := $(ANDROID_JACK_VM)
|
||||||
|
else
|
||||||
|
JACK_VM := java
|
||||||
|
endif
|
||||||
# call jack
|
# call jack
|
||||||
#
|
#
|
||||||
# $(1): jack perf arguments
|
# $(1): vm arguments
|
||||||
|
# $(2): jack perf arguments
|
||||||
|
ifneq (,$(strip $(filter dist,$(MAKECMDGOALS))))
|
||||||
|
JACK_SERVER_LOG_COMMAND := mkdir -p $(DIST_DIR)/logs/; SERVER_LOG=$(DIST_DIR)/logs/jack-server.log
|
||||||
|
endif
|
||||||
define call-jack
|
define call-jack
|
||||||
$(JACK) $(1)
|
$(JACK_SERVER_LOG_COMMAND) JACK_VM_COMMAND="$(JACK_VM) $(1) $(JAVA_TMPDIR_ARG) -jar $(JACK_LAUNCHER_JAR) " JACK_JAR="$(JACK_JAR)" $(JACK) $(2)
|
||||||
endef
|
endef
|
||||||
|
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JACK_VM_ARGS := $(DEFAULT_JACK_VM_ARGS)
|
||||||
ifneq ($(ANDROID_JACK_VM_ARGS),)
|
ifneq ($(ANDROID_JACK_VM_ARGS),)
|
||||||
JACK_VM_ARGS := $(ANDROID_JACK_VM_ARGS)
|
DEFAULT_JACK_VM_ARGS := $(ANDROID_JACK_VM_ARGS)
|
||||||
else
|
else
|
||||||
JACK_VM_ARGS := -Dfile.encoding=UTF-8 -XX:+TieredCompilation
|
DEFAULT_JACK_VM_ARGS := -Dfile.encoding=UTF-8 -Xms2560m -XX:+TieredCompilation
|
||||||
endif
|
endif
|
||||||
ifneq ($(ANDROID_JACK_EXTRA_ARGS),)
|
ifneq ($(ANDROID_JACK_EXTRA_ARGS),)
|
||||||
DEFAULT_JACK_EXTRA_ARGS := $(ANDROID_JACK_EXTRA_ARGS)
|
DEFAULT_JACK_EXTRA_ARGS := $(ANDROID_JACK_EXTRA_ARGS)
|
||||||
|
|
|
@ -1831,7 +1831,7 @@ $(hide) if [ -s $(PRIVATE_JACK_INTERMEDIATES_DIR)/java-source-list-uniq ] ; then
|
||||||
else \
|
else \
|
||||||
export tmpEcjArg=""; \
|
export tmpEcjArg=""; \
|
||||||
fi; \
|
fi; \
|
||||||
$(call call-jack,$(PRIVATE_JACK_EXTRA_ARGS)) \
|
$(call call-jack,$(PRIVATE_JACK_VM_ARGS),$(PRIVATE_JACK_EXTRA_ARGS)) \
|
||||||
$(strip $(PRIVATE_JACK_FLAGS)) \
|
$(strip $(PRIVATE_JACK_FLAGS)) \
|
||||||
$(strip $(PRIVATE_JACK_DEBUG_FLAGS)) \
|
$(strip $(PRIVATE_JACK_DEBUG_FLAGS)) \
|
||||||
$(if $(NO_OPTIMIZE_DX), \
|
$(if $(NO_OPTIMIZE_DX), \
|
||||||
|
@ -1851,7 +1851,7 @@ $(call call-jack,$(PRIVATE_JACK_EXTRA_ARGS)) \
|
||||||
$(addprefix --config-jarjar ,$(strip $(PRIVATE_JARJAR_RULES))) \
|
$(addprefix --config-jarjar ,$(strip $(PRIVATE_JARJAR_RULES))) \
|
||||||
$(if $(PRIVATE_JACK_PROGUARD_FLAGS),--config-proguard $@.flags) \
|
$(if $(PRIVATE_JACK_PROGUARD_FLAGS),--config-proguard $@.flags) \
|
||||||
$$tmpEcjArg \
|
$$tmpEcjArg \
|
||||||
|| ( rm -rf $(PRIVATE_CLASSES_JACK); exit 41 )
|
|| ( rm -rf $(PRIVATE_CLASSES_JACK); rm -rf $(PRIVATE_JACK_INTERMEDIATES_DIR); exit 41 )
|
||||||
$(hide) mv $(PRIVATE_JACK_INTERMEDIATES_DIR)/classes*.dex $(dir $@)
|
$(hide) mv $(PRIVATE_JACK_INTERMEDIATES_DIR)/classes*.dex $(dir $@)
|
||||||
$(hide) rm -f $(PRIVATE_JACK_INTERMEDIATES_DIR)/java-source-list
|
$(hide) rm -f $(PRIVATE_JACK_INTERMEDIATES_DIR)/java-source-list
|
||||||
$(if $(PRIVATE_EXTRA_JAR_ARGS),$(hide) rm -rf $@.res.tmp)
|
$(if $(PRIVATE_EXTRA_JAR_ARGS),$(hide) rm -rf $@.res.tmp)
|
||||||
|
@ -1867,7 +1867,7 @@ define transform-jar-to-jack
|
||||||
$(hide) mkdir -p $@.tmpjill.res
|
$(hide) mkdir -p $@.tmpjill.res
|
||||||
$(hide) $(call unzip-jar-files,$<,$@.tmpjill.res)
|
$(hide) $(call unzip-jar-files,$<,$@.tmpjill.res)
|
||||||
$(hide) find $@.tmpjill.res -iname "*.class" -delete
|
$(hide) find $@.tmpjill.res -iname "*.class" -delete
|
||||||
$(hide) $(call call-jack,$(PRIVATE_JACK_EXTRA_ARGS)) \
|
$(hide) $(call call-jack,$(PRIVATE_JACK_VM_ARGS),$(PRIVATE_JACK_EXTRA_ARGS)) \
|
||||||
-D jack.import.resource.policy=keep-first \
|
-D jack.import.resource.policy=keep-first \
|
||||||
-D jack.import.type.policy=keep-first \
|
-D jack.import.type.policy=keep-first \
|
||||||
--import $@.tmpjill.jack \
|
--import $@.tmpjill.jack \
|
||||||
|
@ -1911,7 +1911,7 @@ $(hide) if [ -s $(PRIVATE_JACK_INTERMEDIATES_DIR)/java-source-list-uniq ] ; then
|
||||||
else \
|
else \
|
||||||
export tmpEcjArg=""; \
|
export tmpEcjArg=""; \
|
||||||
fi; \
|
fi; \
|
||||||
$(call call-jack,$(PRIVATE_JACK_EXTRA_ARGS)) \
|
$(call call-jack,$(PRIVATE_JACK_VM_ARGS),$(PRIVATE_JACK_EXTRA_ARGS)) \
|
||||||
$(strip $(PRIVATE_JACK_FLAGS)) \
|
$(strip $(PRIVATE_JACK_FLAGS)) \
|
||||||
$(strip $(PRIVATE_JACK_DEBUG_FLAGS)) \
|
$(strip $(PRIVATE_JACK_DEBUG_FLAGS)) \
|
||||||
$(if $(NO_OPTIMIZE_DX), \
|
$(if $(NO_OPTIMIZE_DX), \
|
||||||
|
|
|
@ -129,7 +129,7 @@ $(built_dex): PRIVATE_CLASSES_JACK := $(full_classes_jack)
|
||||||
$(built_dex): PRIVATE_JACK_FLAGS := $(LOCAL_JACK_FLAGS)
|
$(built_dex): PRIVATE_JACK_FLAGS := $(LOCAL_JACK_FLAGS)
|
||||||
$(built_dex): $(java_sources) $(java_resource_sources) $(full_jack_lib_deps) \
|
$(built_dex): $(java_sources) $(java_resource_sources) $(full_jack_lib_deps) \
|
||||||
$(jar_manifest_file) $(proto_java_sources_file_stamp) $(LOCAL_MODULE_MAKEFILE) \
|
$(jar_manifest_file) $(proto_java_sources_file_stamp) $(LOCAL_MODULE_MAKEFILE) \
|
||||||
$(LOCAL_MODULE_MAKEFILE) $(LOCAL_ADDITIONAL_DEPENDENCIES) $(JACK)
|
$(LOCAL_MODULE_MAKEFILE) $(LOCAL_ADDITIONAL_DEPENDENCIES) $(JACK_JAR) $(JACK_LAUNCHER_JAR)
|
||||||
@echo Building with Jack: $@
|
@echo Building with Jack: $@
|
||||||
$(jack-java-to-dex)
|
$(jack-java-to-dex)
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ endif
|
||||||
$(full_classes_jack): $(java_sources) $(java_resource_sources) $(full_jack_lib_deps) \
|
$(full_classes_jack): $(java_sources) $(java_resource_sources) $(full_jack_lib_deps) \
|
||||||
$(jar_manifest_file) $(layers_file) $(LOCAL_MODULE_MAKEFILE) \
|
$(jar_manifest_file) $(layers_file) $(LOCAL_MODULE_MAKEFILE) \
|
||||||
$(LOCAL_ADDITIONAL_DEPENDENCIES) $(LOCAL_JARJAR_RULES) \
|
$(LOCAL_ADDITIONAL_DEPENDENCIES) $(LOCAL_JARJAR_RULES) \
|
||||||
$(JACK)
|
$(JACK_JAR) $(JACK_LAUNCHER_JAR)
|
||||||
@echo Building with Jack: $@
|
@echo Building with Jack: $@
|
||||||
$(java-to-jack)
|
$(java-to-jack)
|
||||||
|
|
||||||
|
|
|
@ -619,7 +619,7 @@ $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JACK_FLAGS := $(LOCAL_JACK_FLAGS)
|
||||||
jack_all_deps := $(java_sources) $(java_resource_sources) $(full_jack_lib_deps) \
|
jack_all_deps := $(java_sources) $(java_resource_sources) $(full_jack_lib_deps) \
|
||||||
$(jar_manifest_file) $(layers_file) $(RenderScript_file_stamp) $(proguard_flag_files) \
|
$(jar_manifest_file) $(layers_file) $(RenderScript_file_stamp) $(proguard_flag_files) \
|
||||||
$(proto_java_sources_file_stamp) $(LOCAL_ADDITIONAL_DEPENDENCIES) $(LOCAL_JARJAR_RULES) \
|
$(proto_java_sources_file_stamp) $(LOCAL_ADDITIONAL_DEPENDENCIES) $(LOCAL_JARJAR_RULES) \
|
||||||
$(LOCAL_MODULE_MAKEFILE) $(JACK)
|
$(LOCAL_MODULE_MAKEFILE) $(JACK_JAR) $(JACK_LAUNCHER_JAR)
|
||||||
|
|
||||||
ifeq ($(LOCAL_IS_STATIC_JAVA_LIBRARY),true)
|
ifeq ($(LOCAL_IS_STATIC_JAVA_LIBRARY),true)
|
||||||
$(full_classes_jack): $(jack_all_deps)
|
$(full_classes_jack): $(jack_all_deps)
|
||||||
|
|
|
@ -313,7 +313,7 @@ endif # TARGET JAVA_LIBRARIES
|
||||||
ifeq ($(LOCAL_MODULE_CLASS),JAVA_LIBRARIES)
|
ifeq ($(LOCAL_MODULE_CLASS),JAVA_LIBRARIES)
|
||||||
$(intermediates.COMMON)/classes.jack : PRIVATE_JILL_FLAGS:=$(LOCAL_JILL_FLAGS)
|
$(intermediates.COMMON)/classes.jack : PRIVATE_JILL_FLAGS:=$(LOCAL_JILL_FLAGS)
|
||||||
$(intermediates.COMMON)/classes.jack : $(my_src_jar) $(LOCAL_MODULE_MAKEFILE) \
|
$(intermediates.COMMON)/classes.jack : $(my_src_jar) $(LOCAL_MODULE_MAKEFILE) \
|
||||||
$(LOCAL_ADDITIONAL_DEPENDENCIES) $(JILL_JAR) $(JACK)
|
$(LOCAL_ADDITIONAL_DEPENDENCIES) $(JILL_JAR) $(JACK_JAR) $(JACK_LAUNCHER_JAR)
|
||||||
$(transform-jar-to-jack)
|
$(transform-jar-to-jack)
|
||||||
|
|
||||||
endif # JAVA_LIBRARIES
|
endif # JAVA_LIBRARIES
|
||||||
|
|
Loading…
Reference in New Issue