From a941d137faa59acc7c80e7d263c97d8676859a12 Mon Sep 17 00:00:00 2001 From: Stephen Hines Date: Mon, 29 Aug 2011 18:53:53 -0700 Subject: [PATCH] Provide LOCAL_RENDERSCRIPT_TARGET_API override. BUG=5206223 This allows us to set the RS API level independent of the other SDK versions that a developer might choose. Change-Id: Id8b476abcbbbdaa86e04ba0ea16414cb2fa5bd15 --- core/clear_vars.mk | 1 + core/java.mk | 15 +++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/clear_vars.mk b/core/clear_vars.mk index 1b9bb8a8e..c5e4cc77f 100644 --- a/core/clear_vars.mk +++ b/core/clear_vars.mk @@ -106,6 +106,7 @@ LOCAL_MANIFEST_FILE:= LOCAL_RENDERSCRIPT_INCLUDES:= LOCAL_RENDERSCRIPT_INCLUDES_OVERRIDE:= LOCAL_RENDERSCRIPT_CC:= +LOCAL_RENDERSCRIPT_TARGET_API:= LOCAL_BUILD_HOST_DEX:= LOCAL_DEX_PREOPT:= LOCAL_PROTOC_OPTIMIZE_TYPE:= # lite(default),micro,full diff --git a/core/java.mk b/core/java.mk index c92e439e7..65a883e6f 100644 --- a/core/java.mk +++ b/core/java.mk @@ -136,18 +136,17 @@ RenderScript_file_stamp := $(LOCAL_INTERMEDIATE_SOURCE_DIR)/RenderScript.stamp renderscript_intermediate := $(LOCAL_INTERMEDIATE_SOURCE_DIR)/renderscript renderscript_target_api := + +ifneq (,$(LOCAL_RENDERSCRIPT_TARGET_API)) +renderscript_target_api := $(LOCAL_RENDERSCRIPT_TARGET_API) +else ifneq (,$(LOCAL_SDK_VERSION)) -# Only HC (version 11) should be using the prebuilt RS tools. -ifeq (11,$(LOCAL_SDK_VERSION)) -ifeq ($(LOCAL_RENDERSCRIPT_CC),) -LOCAL_RENDERSCRIPT_CC := prebuilt/$(HOST_PREBUILT_TAG)/llvm-rs-cc/llvm-rs-cc -endif -endif -# Set target-api for LOCAL_SDK_VERSIONs other than 11 and current. -ifneq (,$(filter-out 11 current, $(LOCAL_SDK_VERSION))) +# Set target-api for LOCAL_SDK_VERSIONs other than current. +ifneq (,$(filter-out current, $(LOCAL_SDK_VERSION))) renderscript_target_api := $(LOCAL_SDK_VERSION) endif endif # LOCAL_SDK_VERSION is set +endif # LOCAL_RENDERSCRIPT_TARGET_API is set ifeq ($(LOCAL_RENDERSCRIPT_CC),) LOCAL_RENDERSCRIPT_CC := $(LLVM_RS_CC)