summaryrefslogtreecommitdiffstats
path: root/core/java.mk
diff options
context:
space:
mode:
authorMiao Wang <miaowang@google.com>2015-07-28 17:43:51 -0700
committerStephen Hines <srhines@google.com>2015-07-28 19:30:20 -0700
commit302e944c6034060eb7ff51ea2a3abe740cf2c9b7 (patch)
tree4a4757f4075278adc23953a2e4cd31a37043c0ae /core/java.mk
parent18cf7136a686b9fbac837736445ca7f2edd5947e (diff)
downloadbuild-302e944c6034060eb7ff51ea2a3abe740cf2c9b7.zip
build-302e944c6034060eb7ff51ea2a3abe740cf2c9b7.tar.gz
build-302e944c6034060eb7ff51ea2a3abe740cf2c9b7.tar.bz2
[RenderScript] Set RS_PREBUILT_LIBPATH for 64bit targets.
Bug: 22796994 Bug: 22693954 This change fixes the RS_PREBUILT_LIBPATH when used with 64-bit target devices. It also fixes an issue where the target RenderScript API is below 21 for 64-bit compilation. In those cases, we should always upconvert it to 21 (since that is the first available 64-bit release). Change-Id: I27e9d0bd5c01bac0b3b28e9002333264a55d628f
Diffstat (limited to 'core/java.mk')
-rw-r--r--core/java.mk22
1 files changed, 15 insertions, 7 deletions
diff --git a/core/java.mk b/core/java.mk
index 0ff59fc..040e674 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -148,19 +148,27 @@ renderscript_sources_fullpath := $(addprefix $(LOCAL_PATH)/, $(renderscript_sour
RenderScript_file_stamp := $(LOCAL_INTERMEDIATE_SOURCE_DIR)/RenderScript.stamp
renderscript_intermediate.COMMON := $(LOCAL_INTERMEDIATE_SOURCE_DIR)/renderscript
+# Defaulting to an empty string uses the latest available platform SDK.
renderscript_target_api :=
ifneq (,$(LOCAL_RENDERSCRIPT_TARGET_API))
-renderscript_target_api := $(LOCAL_RENDERSCRIPT_TARGET_API)
+ 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 system_current, $(LOCAL_SDK_VERSION)))
-renderscript_target_api := $(LOCAL_SDK_VERSION)
-endif
-endif # LOCAL_SDK_VERSION is set
+ ifneq (,$(LOCAL_SDK_VERSION))
+ # Set target-api for LOCAL_SDK_VERSIONs other than current.
+ ifneq (,$(filter-out current system_current, $(LOCAL_SDK_VERSION)))
+ renderscript_target_api := $(LOCAL_SDK_VERSION)
+ endif
+ endif # LOCAL_SDK_VERSION is set
endif # LOCAL_RENDERSCRIPT_TARGET_API is set
+# For 64-bit, we always have to upgrade to at least 21
+ifeq ($(TARGET_IS_64_BIT),true)
+ ifneq ($(filter $(RSCOMPAT_32BIT_ONLY_API_LEVELS),$(renderscript_target_api)),)
+ renderscript_target_api := 21
+ endif
+endif
+
ifeq ($(LOCAL_RENDERSCRIPT_CC),)
LOCAL_RENDERSCRIPT_CC := $(LLVM_RS_CC)
endif