Set -bootclasspath to "" if LOCAL_NO_STANDARD_LIBRARIES
Without this if a Java libraryw with LOCAL_NO_STANDARD_LIBRARIES doesn't have core-libart in its LOCAL_JAVA_LIBRARIES, it would use core-libart as bootclasspath but without having dependency on it. Change-Id: I611a5a5df2bf0ad59e0be50ed1ad1afe8b843e90
This commit is contained in:
parent
94a47cd03a
commit
c6a301756c
|
@ -28,8 +28,7 @@ include $(BUILD_SYSTEM)/host_java_library_common.mk
|
|||
#######################################
|
||||
|
||||
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
|
||||
endif
|
||||
|
||||
full_classes_compiled_jar := $(intermediates.COMMON)/classes-full-debug.jar
|
||||
|
|
|
@ -24,8 +24,7 @@ ifeq ($(HOST_OS),linux)
|
|||
LOCAL_UNINSTALLABLE_MODULE := true
|
||||
LOCAL_IS_STATIC_JAVA_LIBRARY := true
|
||||
USE_CORE_LIB_BOOTCLASSPATH := true
|
||||
LOCAL_JAVA_LIBRARIES += core-oj-hostdex
|
||||
LOCAL_JAVA_LIBRARIES += core-libart-hostdex
|
||||
LOCAL_JAVA_LIBRARIES += core-oj-hostdex core-libart-hostdex
|
||||
|
||||
intermediates.COMMON := $(call intermediates-dir-for,JAVA_LIBRARIES,$(LOCAL_MODULE),true,COMMON,)
|
||||
full_classes_jack := $(intermediates.COMMON)/classes.jack
|
||||
|
|
|
@ -133,17 +133,23 @@ $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_RMTYPEDEFS := $(LOCAL_RMTYPEDEFS)
|
|||
# be up-to-date.
|
||||
ifndef LOCAL_IS_HOST_MODULE
|
||||
ifeq ($(LOCAL_SDK_VERSION),)
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(call java-lib-files,core-oj):$(call java-lib-files,core-libart)
|
||||
ifeq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
|
||||
# No bootclasspath. But we still need "" to prevent javac from using default host bootclasspath.
|
||||
my_bootclasspath := ""
|
||||
else # LOCAL_NO_STANDARD_LIBRARIES
|
||||
my_bootclasspath := $(call java-lib-files,core-oj):$(call java-lib-files,core-libart)
|
||||
endif # LOCAL_NO_STANDARD_LIBRARIES
|
||||
else
|
||||
ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),current)
|
||||
# LOCAL_SDK_VERSION is current and no TARGET_BUILD_APPS.
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(call java-lib-files,android_stubs_current)
|
||||
my_bootclasspath := $(call java-lib-files,android_stubs_current)
|
||||
else ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),system_current)
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(call java-lib-files,android_system_stubs_current)
|
||||
my_bootclasspath := $(call java-lib-files,android_system_stubs_current)
|
||||
else
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(call java-lib-files,sdk_v$(LOCAL_SDK_VERSION))
|
||||
my_bootclasspath := $(call java-lib-files,sdk_v$(LOCAL_SDK_VERSION))
|
||||
endif # current or system_current
|
||||
endif # LOCAL_SDK_VERSION
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(my_bootclasspath)
|
||||
|
||||
full_shared_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
|
||||
full_java_lib_deps := $(call java-lib-deps,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
|
||||
|
@ -151,7 +157,12 @@ full_java_lib_deps := $(call java-lib-deps,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HO
|
|||
else # LOCAL_IS_HOST_MODULE
|
||||
|
||||
ifeq ($(USE_CORE_LIB_BOOTCLASSPATH),true)
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(call java-lib-files,core-oj-hostdex,$(LOCAL_IS_HOST_MODULE)):$(call java-lib-files,core-libart-hostdex,$(LOCAL_IS_HOST_MODULE))
|
||||
ifeq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
|
||||
my_bootclasspath := ""
|
||||
else
|
||||
my_bootclasspath := $(call java-lib-files,core-oj-hostdex,$(LOCAL_IS_HOST_MODULE)):$(call java-lib-files,core-libart-hostdex,$(LOCAL_IS_HOST_MODULE))
|
||||
endif
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(my_bootclasspath)
|
||||
|
||||
full_shared_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
|
||||
full_java_lib_deps := $(call java-lib-deps,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE)) \
|
||||
|
@ -262,17 +273,22 @@ $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_STATIC_JACK_LIBRARIES := $(full_static_ja
|
|||
|
||||
ifndef LOCAL_IS_HOST_MODULE
|
||||
ifeq ($(LOCAL_SDK_VERSION),)
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH_JAVA_LIBRARIES := $(call jack-lib-files,core-oj):$(call jack-lib-files,core-libart)
|
||||
ifeq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
|
||||
my_bootclasspath :=
|
||||
else
|
||||
my_bootclasspath := $(call jack-lib-files,core-oj 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.
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH_JAVA_LIBRARIES := $(call jack-lib-files,android_stubs_current)
|
||||
my_bootclasspath := $(call jack-lib-files,android_stubs_current)
|
||||
else ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),system_current)
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH_JAVA_LIBRARIES := $(call jack-lib-files,android_system_stubs_current)
|
||||
my_bootclasspath := $(call jack-lib-files,android_system_stubs_current)
|
||||
else
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH_JAVA_LIBRARIES := $(call jack-lib-files,sdk_v$(LOCAL_SDK_VERSION))
|
||||
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_lib_deps := $(call jack-lib-deps,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
|
||||
|
@ -280,7 +296,12 @@ full_jack_lib_deps := $(call jack-lib-deps,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HO
|
|||
else # LOCAL_IS_HOST_MODULE
|
||||
|
||||
ifeq ($(USE_CORE_LIB_BOOTCLASSPATH),true)
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH_JAVA_LIBRARIES := $(call jack-lib-files,core-oj-hostdex,$(LOCAL_IS_HOST_MODULE)):$(call jack-lib-files,core-libart-hostdex,$(LOCAL_IS_HOST_MODULE))
|
||||
ifeq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
|
||||
my_bootclasspath :=
|
||||
else
|
||||
my_bootclasspath := $(call jack-lib-files,core-oj-hostdex core-libart-hostdex,$(LOCAL_IS_HOST_MODULE))
|
||||
endif
|
||||
$(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_lib_deps := $(call jack-lib-deps,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue