Merge changes I6e98fc65,Ia8665e7c
* changes: Remove bootclasspath handling for Jack Remove static libraries from Jack classpath
This commit is contained in:
commit
5ce149b76a
4 changed files with 10 additions and 55 deletions
|
@ -700,12 +700,6 @@ define jack-lib-files
|
|||
$(foreach lib,$(1),$(call _jack-lib-full-classes,$(lib),$(2)))
|
||||
endef
|
||||
|
||||
# $(1): library name list
|
||||
# $(2): Non-empty if IS_HOST_MODULE
|
||||
define jack-lib-deps
|
||||
$(call jack-lib-files,$(1),$(2))
|
||||
endef
|
||||
|
||||
###########################################################
|
||||
## Run rot13 on a string
|
||||
## $(1): the string. Must be one line.
|
||||
|
@ -2099,7 +2093,7 @@ $(call call-jack) \
|
|||
$(if $(PRIVATE_RMTYPEDEFS), \
|
||||
-D jack.android.remove-typedef="true") \
|
||||
$(addprefix --classpath ,$(strip \
|
||||
$(call normalize-path-list,$(PRIVATE_BOOTCLASSPATH_JAVA_LIBRARIES) $(PRIVATE_ALL_JACK_LIBRARIES)))) \
|
||||
$(call normalize-path-list,$(PRIVATE_JACK_SHARED_LIBRARIES)))) \
|
||||
$(addprefix --import ,$(call reverse-list,$(PRIVATE_STATIC_JACK_LIBRARIES))) \
|
||||
$(if $(PRIVATE_EXTRA_JAR_ARGS),--import-resource $@.res.tmp) \
|
||||
-D jack.android.min-api-level=$(PRIVATE_JACK_MIN_SDK_VERSION) \
|
||||
|
@ -2143,7 +2137,7 @@ $(hide) if [ -s $@.java-source-list-uniq ] ; then \
|
|||
$(call call-jack) \
|
||||
$(strip $(PRIVATE_JACK_FLAGS)) \
|
||||
$(addprefix --classpath ,$(strip \
|
||||
$(call normalize-path-list,$(call reverse-list,$(PRIVATE_STATIC_JACK_LIBRARIES)) $(PRIVATE_BOOTCLASSPATH_JAVA_LIBRARIES) $(PRIVATE_ALL_JACK_LIBRARIES)))) \
|
||||
$(call normalize-path-list,$(call reverse-list,$(PRIVATE_STATIC_JACK_LIBRARIES)) $(PRIVATE_JACK_SHARED_LIBRARIES)))) \
|
||||
-D jack.import.resource.policy=keep-first \
|
||||
-D jack.android.min-api-level=$(PRIVATE_JACK_MIN_SDK_VERSION) \
|
||||
-D jack.import.type.policy=keep-first \
|
||||
|
@ -2265,7 +2259,7 @@ $(call call-jack) \
|
|||
$(if $(NO_OPTIMIZE_DX), \
|
||||
-D jack.dex.optimize="false") \
|
||||
$(addprefix --classpath ,$(strip \
|
||||
$(call normalize-path-list,$(PRIVATE_BOOTCLASSPATH_JAVA_LIBRARIES) $(PRIVATE_ALL_JACK_LIBRARIES)))) \
|
||||
$(call normalize-path-list,$(PRIVATE_JACK_SHARED_LIBRARIES)))) \
|
||||
$(addprefix --import ,$(call reverse-list,$(PRIVATE_STATIC_JACK_LIBRARIES))) \
|
||||
$(if $(PRIVATE_EXTRA_JAR_ARGS),--import-resource $@.res.tmp) \
|
||||
-D jack.import.resource.policy=keep-first \
|
||||
|
|
|
@ -36,8 +36,7 @@ ifeq ($(LOCAL_IS_STATIC_JAVA_LIBRARY),true)
|
|||
endif
|
||||
|
||||
ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
|
||||
LOCAL_JAVA_LIBRARIES += core-oj-hostdex
|
||||
LOCAL_JAVA_LIBRARIES += core-libart-hostdex
|
||||
LOCAL_JAVA_LIBRARIES := core-oj-hostdex core-libart-hostdex $(LOCAL_JAVA_LIBRARIES)
|
||||
endif
|
||||
|
||||
full_classes_jack := $(intermediates.COMMON)/classes.jack
|
||||
|
|
|
@ -24,5 +24,4 @@ LOCAL_IS_STATIC_JAVA_LIBRARY := true
|
|||
|
||||
include $(BUILD_SYSTEM)/host_dalvik_java_library.mk
|
||||
|
||||
USE_CORE_LIB_BOOTCLASSPATH :=
|
||||
LOCAL_IS_STATIC_JAVA_LIBRARY :=
|
||||
|
|
|
@ -318,52 +318,16 @@ full_static_jack_libs := \
|
|||
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_STATIC_JACK_LIBRARIES := $(full_static_jack_libs)
|
||||
|
||||
ifndef LOCAL_IS_HOST_MODULE
|
||||
ifeq ($(LOCAL_SDK_VERSION),)
|
||||
ifeq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
|
||||
my_bootclasspath :=
|
||||
else
|
||||
my_bootclasspath := $(call jack-lib-files,core-oj):$(call jack-lib-files,core-libart)
|
||||
endif
|
||||
else # LOCAL_SDK_VERSION
|
||||
ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),current)
|
||||
# LOCAL_SDK_VERSION is current and no TARGET_BUILD_APPS.
|
||||
my_bootclasspath := $(call jack-lib-files,android_stubs_current)
|
||||
else ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),system_current)
|
||||
my_bootclasspath := $(call jack-lib-files,android_system_stubs_current)
|
||||
else
|
||||
my_bootclasspath :=$(call jack-lib-files,sdk_v$(LOCAL_SDK_VERSION))
|
||||
endif # current or system_current
|
||||
endif # LOCAL_SDK_VERSION
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH_JAVA_LIBRARIES := $(my_bootclasspath)
|
||||
|
||||
full_shared_jack_libs := $(call jack-lib-files,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
|
||||
full_jack_deps := $(call jack-lib-deps,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
|
||||
full_jack_deps := $(full_shared_jack_libs)
|
||||
|
||||
ifndef LOCAL_IS_HOST_MODULE
|
||||
# Turn off .toc optimization for apps build as we cannot build dexdump.
|
||||
ifeq (,$(TARGET_BUILD_APPS))
|
||||
full_jack_deps := $(patsubst %.jack, %.dex.toc, $(full_jack_deps))
|
||||
endif
|
||||
|
||||
else # LOCAL_IS_HOST_MODULE
|
||||
|
||||
ifeq ($(USE_CORE_LIB_BOOTCLASSPATH),true)
|
||||
ifeq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
|
||||
my_bootclasspath :=
|
||||
else
|
||||
my_bootclasspath := $(call jack-lib-files,core-oj-hostdex,$(LOCAL_IS_HOST_MODULE)):$(call jack-lib-files,core-libart-hostdex,$(LOCAL_IS_HOST_MODULE))
|
||||
endif
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH_JAVA_LIBRARIES := $(my_bootclasspath)
|
||||
# Compiling against the final jack library. If we want to add support for obfuscated library
|
||||
# we'll need to change that to compile against the not obfuscated jack library.
|
||||
full_shared_jack_libs := $(call jack-lib-files,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
|
||||
full_jack_deps := $(call jack-lib-deps,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
|
||||
else
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH_JAVA_LIBRARIES :=
|
||||
full_shared_jack_libs := $(call jack-lib-deps,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
|
||||
full_jack_deps := $(full_shared_jack_libs)
|
||||
endif # USE_CORE_LIB_BOOTCLASSPATH
|
||||
endif # !LOCAL_IS_HOST_MODULE
|
||||
full_jack_libs := $(full_shared_jack_libs) $(full_static_jack_libs) $(LOCAL_JACK_CLASSPATH)
|
||||
full_shared_jack_libs += $(LOCAL_JACK_CLASSPATH)
|
||||
full_jack_deps += $(full_static_jack_libs) $(LOCAL_JACK_CLASSPATH)
|
||||
|
||||
ifndef LOCAL_IS_HOST_MODULE
|
||||
|
@ -377,7 +341,6 @@ ifneq ($(apk_libraries),)
|
|||
|
||||
# link against the jar with full original names (before proguard processing).
|
||||
full_shared_jack_libs += $(link_apk_jack_libraries)
|
||||
full_jack_libs += $(link_apk_jack_libraries)
|
||||
full_jack_deps += $(link_apk_jack_libraries)
|
||||
endif
|
||||
|
||||
|
@ -387,13 +350,13 @@ endif
|
|||
ifdef LOCAL_INSTRUMENTATION_FOR
|
||||
# link against the jar with full original names (before proguard processing).
|
||||
link_instr_classes_jack := $(link_instr_intermediates_dir.COMMON)/classes.noshrob.jack
|
||||
full_jack_libs += $(link_instr_classes_jack)
|
||||
full_shared_jack_libs += $(link_instr_classes_jack)
|
||||
full_jack_deps += $(link_instr_classes_jack)
|
||||
endif # LOCAL_INSTRUMENTATION_FOR
|
||||
endif # !LOCAL_IS_HOST_MODULE
|
||||
|
||||
# Propagate local configuration options to this target.
|
||||
$(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_ALL_JACK_LIBRARIES:= $(full_jack_libs)
|
||||
$(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_JACK_SHARED_LIBRARIES:= $(full_shared_jack_libs)
|
||||
$(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_JARJAR_RULES := $(LOCAL_JARJAR_RULES)
|
||||
|
||||
endif # need_compile_java
|
||||
|
|
Loading…
Reference in a new issue