Allow control of jack used for compilation
Version of Jack used to compile a module can now be control from
a dedicated mk located in prebuilts/sdk/tools
Bug: 24564814
(cherry picked from commit b68c9a498d
)
Change-Id: I7809dc966026ff94b5cb2daa7e2c63762ca4768d
This commit is contained in:
parent
b2c5558435
commit
8998d57404
7 changed files with 24 additions and 6 deletions
|
@ -486,12 +486,6 @@ DEFAULT_JACK_ENABLED:=full
|
|||
else
|
||||
DEFAULT_JACK_ENABLED:=
|
||||
endif
|
||||
# call jack
|
||||
#
|
||||
# $(1): jack perf arguments
|
||||
define call-jack
|
||||
$(JACK) $(1)
|
||||
endef
|
||||
ifneq ($(ANDROID_JACK_EXTRA_ARGS),)
|
||||
DEFAULT_JACK_EXTRA_ARGS := $(ANDROID_JACK_EXTRA_ARGS)
|
||||
else
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
ifdef ANDROID_FORCE_JACK_ENABLED
|
||||
LOCAL_JACK_ENABLED := $(ANDROID_FORCE_JACK_ENABLED)
|
||||
endif
|
||||
|
||||
LOCAL_JACK_ENABLED := $(strip $(LOCAL_JACK_ENABLED))
|
||||
|
||||
ifneq ($(LOCAL_JACK_ENABLED),full)
|
||||
ifneq ($(LOCAL_JACK_ENABLED),incremental)
|
||||
ifdef LOCAL_JACK_ENABLED
|
||||
|
@ -28,3 +30,9 @@ endif
|
|||
LOCAL_JACK_ENABLED :=
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef $(LOCAL_MODULE).JACK_VERSION
|
||||
LOCAL_JACK_VERSION := $($(LOCAL_MODULE).JACK_VERSION)
|
||||
else
|
||||
LOCAL_JACK_VERSION := $(JACK_DEFAULT_VERSION)
|
||||
endif
|
||||
|
|
|
@ -1777,6 +1777,13 @@ define unzip-jar-files
|
|||
$(if $(PRIVATE_DONT_DELETE_JAR_META_INF),,;rm -rf $(2)/META-INF)
|
||||
endef
|
||||
|
||||
# Call jack
|
||||
#
|
||||
# $(1): jack extra arguments
|
||||
define call-jack
|
||||
JACK_VERSION=$(PRIVATE_JACK_VERSION) $(JACK) $(1)
|
||||
endef
|
||||
|
||||
# Common definition to invoke javac on the host and target.
|
||||
#
|
||||
# Some historical notes:
|
||||
|
|
|
@ -123,6 +123,7 @@ endif
|
|||
|
||||
$(built_dex): PRIVATE_CLASSES_JACK := $(full_classes_jack)
|
||||
$(built_dex): PRIVATE_JACK_FLAGS := $(GLOBAL_JAVAC_DEBUG_FLAGS) $(LOCAL_JACK_FLAGS)
|
||||
$(built_dex): PRIVATE_JACK_VERSION := $(LOCAL_JACK_VERSION)
|
||||
$(built_dex): $(java_sources) $(java_resource_sources) $(full_jack_lib_deps) \
|
||||
$(jar_manifest_file) $(proto_java_sources_file_stamp) $(LOCAL_MODULE_MAKEFILE_DEP) \
|
||||
$(LOCAL_ADDITIONAL_DEPENDENCIES) $(JACK)
|
||||
|
|
|
@ -35,6 +35,7 @@ include $(BUILD_SYSTEM)/host_java_library.mk
|
|||
# proguard is not supported
|
||||
# *.proto files are not supported
|
||||
$(full_classes_jack): PRIVATE_JACK_FLAGS := $(GLOBAL_JAVAC_DEBUG_FLAGS) $(LOCAL_JACK_FLAGS)
|
||||
$(full_classes_jack): PRIVATE_JACK_VERSION := $(LOCAL_JACK_VERSION)
|
||||
$(full_classes_jack): PRIVATE_JARJAR_RULES := $(LOCAL_JARJAR_RULES)
|
||||
$(full_classes_jack): \
|
||||
PRIVATE_JACK_INTERMEDIATES_DIR := $(intermediates.COMMON)/jack-rsc
|
||||
|
|
|
@ -644,6 +644,7 @@ $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JACK_PROGUARD_FLAGS :=
|
|||
endif # LOCAL_PROGUARD_ENABLED defined
|
||||
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JACK_FLAGS := $(GLOBAL_JAVAC_DEBUG_FLAGS) $(LOCAL_JACK_FLAGS)
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JACK_VERSION := $(LOCAL_JACK_VERSION)
|
||||
|
||||
jack_all_deps := $(java_sources) $(java_resource_sources) $(full_jack_lib_deps) \
|
||||
$(jar_manifest_file) $(layers_file) $(RenderScript_file_stamp) $(proguard_flag_files) \
|
||||
|
|
|
@ -312,6 +312,12 @@ TARGET_BUILD_JAVA_SUPPORT_LEVEL := platform
|
|||
# The pdk (Platform Development Kit) build
|
||||
include build/core/pdk_config.mk
|
||||
|
||||
#
|
||||
# -----------------------------------------------------------------
|
||||
# Jack version configuration
|
||||
include $(TOPDIR)prebuilts/sdk/tools/jack_versions.mk
|
||||
include $(TOPDIR)prebuilts/sdk/tools/jack_for_module.mk
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
###
|
||||
### In this section we set up the things that are different
|
||||
|
|
Loading…
Reference in a new issue