forked from openkylin/platform_build
Align up java-lib-files and java-lib-deps.
- For host Java libraries, java-lib-files should return javalib.jar.
- Host dalvik Java libraries are special: factor out
host-dex-java-lib-files.
- Be explict that jack-lib-deps equals jack-lib-files.
Bug: 27451686
Change-Id: I9235384354e119ef7ebbf29b7e525d1ceea242e0
(cherry-pick from commit 063d0455e0
)
This commit is contained in:
parent
b97ce3bb61
commit
ea04f821fc
|
@ -654,25 +654,36 @@ endef
|
|||
# $(1): library name
|
||||
# $(2): Non-empty if IS_HOST_MODULE
|
||||
define _java-lib-full-classes.jar
|
||||
$(call _java-lib-dir,$(1),$(2))/classes$(COMMON_JAVA_PACKAGE_SUFFIX)
|
||||
$(call _java-lib-dir,$(1),$(2))/$(if $(2),javalib,classes)$(COMMON_JAVA_PACKAGE_SUFFIX)
|
||||
endef
|
||||
|
||||
# Get the jar files (you can pass to "javac -classpath") of static or shared
|
||||
# Java libraries that you want to link against.
|
||||
# $(1): library name list
|
||||
# $(2): Non-empty if IS_HOST_MODULE
|
||||
define java-lib-files
|
||||
$(foreach lib,$(1),$(call _java-lib-full-classes.jar,$(lib),$(2)))
|
||||
endef
|
||||
|
||||
# $(1): library name
|
||||
# $(2): Non-empty if IS_HOST_MODULE
|
||||
define _java-lib-full-dep
|
||||
$(call _java-lib-dir,$(1),$(2))/$(if $(2),javalib,classes)$(COMMON_JAVA_PACKAGE_SUFFIX)
|
||||
endef
|
||||
|
||||
# Get the dependency files (you can put on the right side of "|" of a build rule)
|
||||
# of the Java libraries.
|
||||
# $(1): library name list
|
||||
# $(2): Non-empty if IS_HOST_MODULE
|
||||
# Historically for target Java libraries we used a different file (javalib.jar)
|
||||
# as the dependency.
|
||||
# Now we can use classes.jar as dependency, so java-lib-deps is the same
|
||||
# as java-lib-files.
|
||||
define java-lib-deps
|
||||
$(foreach lib,$(1),$(call _java-lib-full-dep,$(lib),$(2)))
|
||||
$(call java-lib-files,$(1),$(2))
|
||||
endef
|
||||
|
||||
# Get the jar files (you can pass to "javac -classpath") of host dalvik Java libraries.
|
||||
# You can also use them as dependency files.
|
||||
# A host dalvik Java library is different from a host Java library in that
|
||||
# the java lib file is classes.jar, not javalib.jar.
|
||||
# $(1): library name list
|
||||
define host-dex-java-lib-files
|
||||
$(foreach lib,$(1),$(call _java-lib-dir,$(lib),true)/classes.jar)
|
||||
endef
|
||||
|
||||
###########################################################
|
||||
|
@ -693,16 +704,10 @@ define jack-lib-files
|
|||
$(foreach lib,$(1),$(call _jack-lib-full-classes,$(lib),$(2)))
|
||||
endef
|
||||
|
||||
# $(1): library name
|
||||
# $(2): Non-empty if IS_HOST_MODULE
|
||||
define _jack-lib-full-dep
|
||||
$(call _jack-lib-full-classes,$(1),$(2))
|
||||
endef
|
||||
|
||||
# $(1): library name list
|
||||
# $(2): Non-empty if IS_HOST_MODULE
|
||||
define jack-lib-deps
|
||||
$(foreach lib,$(1),$(call _jack-lib-full-dep,$(lib),$(2)))
|
||||
$(call jack-lib-files,$(1),$(2))
|
||||
endef
|
||||
|
||||
###########################################################
|
||||
|
|
|
@ -175,14 +175,13 @@ ifeq ($(USE_CORE_LIB_BOOTCLASSPATH),true)
|
|||
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))
|
||||
my_bootclasspath := $(call normalize-path-list,$(call host-dex-java-lib-files,core-oj-hostdex core-libart-hostdex))
|
||||
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)) \
|
||||
$(full_shared_java_libs)
|
||||
else
|
||||
full_shared_java_libs := $(call host-dex-java-lib-files,$(LOCAL_JAVA_LIBRARIES))
|
||||
full_java_lib_deps := $(full_shared_java_libs)
|
||||
else # !USE_CORE_LIB_BOOTCLASSPATH
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH :=
|
||||
|
||||
full_shared_java_libs := $(addprefix $(HOST_OUT_JAVA_LIBRARIES)/,\
|
||||
|
|
Loading…
Reference in New Issue