Merge "Add support for specifying LOCAL_SDK_LIBRARIES for prebuilts."
This commit is contained in:
commit
4ad0be36e3
3 changed files with 10 additions and 7 deletions
|
@ -230,6 +230,7 @@ LOCAL_SANITIZE:=
|
|||
LOCAL_SANITIZE_DIAG:=
|
||||
LOCAL_SANITIZE_RECOVER:=
|
||||
LOCAL_SANITIZE_BLACKLIST :=
|
||||
LOCAL_SDK_LIBRARIES :=
|
||||
LOCAL_SDK_RES_VERSION:=
|
||||
LOCAL_SDK_VERSION:=
|
||||
LOCAL_SHARED_ANDROID_LIBRARIES:=
|
||||
|
|
|
@ -963,10 +963,11 @@ endif
|
|||
# 23 -> sdk_public_23_android
|
||||
# system_current -> sdk_system_current_android
|
||||
# $(1): An sdk version (LOCAL_SDK_VERSION)
|
||||
# $(2): optional library name (default: android)
|
||||
define resolve-prebuilt-sdk-module
|
||||
$(if $(findstring _,$(1)),\
|
||||
sdk_$(1)_android,\
|
||||
sdk_public_$(1)_android)
|
||||
sdk_$(1)_$(or $(2),android),\
|
||||
sdk_public_$(1)_$(or $(2),android))
|
||||
endef
|
||||
|
||||
# Resolve LOCAL_SDK_VERSION to prebuilt framework.aidl
|
||||
|
|
|
@ -230,6 +230,7 @@ empty_bootclasspath :=
|
|||
my_system_modules :=
|
||||
|
||||
ifndef LOCAL_IS_HOST_MODULE
|
||||
sdk_libs :=
|
||||
ifeq ($(LOCAL_SDK_VERSION),)
|
||||
ifeq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
|
||||
# No bootclasspath. But we still need "" to prevent javac from using default host bootclasspath.
|
||||
|
@ -261,9 +262,10 @@ ifndef LOCAL_IS_HOST_MODULE
|
|||
else ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),core_current)
|
||||
full_java_bootclasspath_libs := $(call java-lib-header-files,core.current.stubs)
|
||||
else
|
||||
# TARGET_BUILD_APPS is set. Use the modules defined in prebuilts/sdk/Android.mk.
|
||||
# TARGET_BUILD_APPS or numbered SDK. Use the modules defined in prebuilts/sdk/Android.mk.
|
||||
_module_name := $(call resolve-prebuilt-sdk-module,$(LOCAL_SDK_VERSION))
|
||||
full_java_bootclasspath_libs := $(call java-lib-header-files,$(_module_name))
|
||||
sdk_libs := $(foreach lib_name,$(LOCAL_SDK_LIBRARIES),$(call resolve-prebuilt-sdk-module,$(LOCAL_SDK_VERSION),$(lib_name)))
|
||||
_module_name :=
|
||||
endif # current, system_current, system_${VER}, test_current or core_current
|
||||
endif # LOCAL_SDK_VERSION
|
||||
|
@ -291,10 +293,9 @@ ifndef LOCAL_IS_HOST_MODULE
|
|||
full_java_bootclasspath_libs += $(call java-lib-header-files,core-lambda-stubs)
|
||||
endif
|
||||
endif
|
||||
|
||||
full_shared_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
|
||||
full_shared_java_header_libs := $(call java-lib-header-files,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
|
||||
|
||||
full_shared_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES) $(sdk_libs),$(LOCAL_IS_HOST_MODULE))
|
||||
full_shared_java_header_libs := $(call java-lib-header-files,$(LOCAL_JAVA_LIBRARIES) $(sdk_libs),$(LOCAL_IS_HOST_MODULE))
|
||||
sdk_libs :=
|
||||
else # LOCAL_IS_HOST_MODULE
|
||||
|
||||
ifeq ($(USE_CORE_LIB_BOOTCLASSPATH),true)
|
||||
|
|
Loading…
Reference in a new issue