summaryrefslogtreecommitdiffstats
path: root/core/java.mk
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2014-07-19 17:00:50 -0700
committerYing Wang <wangying@google.com>2014-07-19 17:00:50 -0700
commitefb935800bce97abe0938270ba4c9cd3af6fb7b9 (patch)
treefbce59b895518f4815a7c17e28d4e382fc268c48 /core/java.mk
parent50367cc77db4f576f6e7421e6b302395d202482e (diff)
downloadbuild-efb935800bce97abe0938270ba4c9cd3af6fb7b9.zip
build-efb935800bce97abe0938270ba4c9cd3af6fb7b9.tar.gz
build-efb935800bce97abe0938270ba4c9cd3af6fb7b9.tar.bz2
Support "LOCAL_SDK_VERSION := system_current"
A module can declare "LOCAL_SDK_VERSION := system_current" to build against the android system stubs generated from source. For now this is only supported in platform build. Change-Id: I1e9bbd159886bc0ea3a02b1dc4cbcb1a56e9cb15
Diffstat (limited to 'core/java.mk')
-rw-r--r--core/java.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/java.mk b/core/java.mk
index 8afa748..52d31d0 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -26,6 +26,8 @@ ifneq ($(LOCAL_SDK_VERSION),)
ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),current)
# Use android_stubs_current if LOCAL_SDK_VERSION is current and no TARGET_BUILD_APPS.
LOCAL_JAVA_LIBRARIES := android_stubs_current $(LOCAL_JAVA_LIBRARIES)
+ else ifeq ($(LOCAL_SDK_VERSION)$(TARGET_BUILD_APPS),system_current)
+ LOCAL_JAVA_LIBRARIES := android_system_stubs_current $(LOCAL_JAVA_LIBRARIES)
else
LOCAL_JAVA_LIBRARIES := sdk_v$(LOCAL_SDK_VERSION) $(LOCAL_JAVA_LIBRARIES)
endif
@@ -142,7 +144,7 @@ renderscript_target_api := $(LOCAL_RENDERSCRIPT_TARGET_API)
else
ifneq (,$(LOCAL_SDK_VERSION))
# Set target-api for LOCAL_SDK_VERSIONs other than current.
-ifneq (,$(filter-out current, $(LOCAL_SDK_VERSION)))
+ifneq (,$(filter-out current system_current, $(LOCAL_SDK_VERSION)))
renderscript_target_api := $(LOCAL_SDK_VERSION)
endif
endif # LOCAL_SDK_VERSION is set
@@ -158,7 +160,7 @@ renderscript_flags := -Wall -Werror
renderscript_flags += $(LOCAL_RENDERSCRIPT_FLAGS)
# prepend the RenderScript system include path
-ifneq ($(filter-out current,$(LOCAL_SDK_VERSION))$(if $(TARGET_BUILD_APPS),$(filter current,$(LOCAL_SDK_VERSION))),)
+ifneq ($(filter-out current system_current,$(LOCAL_SDK_VERSION))$(if $(TARGET_BUILD_APPS),$(filter current system_current,$(LOCAL_SDK_VERSION))),)
# if a numeric LOCAL_SDK_VERSION, or current LOCAL_SDK_VERSION with TARGET_BUILD_APPS
LOCAL_RENDERSCRIPT_INCLUDES := \
$(HISTORICAL_SDK_VERSIONS_ROOT)/renderscript/clang-include \