Remove bootclasspath handling for Jack
Bootclasspath libraries are already added in LOCAL_JAVA_LIBRARIES by java.mk and host_dalvik_java_library.mk meaning that bootclasspath handling was just doing a duplicate work and adding duplicated entries to the classpath. Also fix order of bootclasspath libraries for host. Bug: 28307907 Change-Id: I6e98fc651a127435c029de65285dbf2cb04844af
This commit is contained in:
parent
2dc79b11cd
commit
ae2fc81706
4 changed files with 7 additions and 51 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.
|
||||
|
@ -2019,7 +2013,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_JACK_SHARED_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) \
|
||||
|
@ -2063,7 +2057,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_JACK_SHARED_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 \
|
||||
|
@ -2185,7 +2179,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_JACK_SHARED_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,50 +318,14 @@ 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_shared_jack_libs += $(LOCAL_JACK_CLASSPATH)
|
||||
full_jack_deps += $(full_static_jack_libs) $(LOCAL_JACK_CLASSPATH)
|
||||
|
|
Loading…
Reference in a new issue