[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
diff --git a/core/config.mk b/core/config.mk
index 3e527a8..51810aa 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -675,8 +675,12 @@
# Set up RS prebuilt variables for compatibility library
RS_PREBUILT_CLCORE := prebuilts/sdk/renderscript/lib/$(TARGET_ARCH)/librsrt_$(TARGET_ARCH).bc
-RS_PREBUILT_LIBPATH := -L prebuilts/ndk/8/platforms/android-9/arch-$(TARGET_ARCH)/usr/lib
RS_PREBUILT_COMPILER_RT := prebuilts/sdk/renderscript/lib/$(TARGET_ARCH)/libcompiler_rt.a
+ifeq (true,$(TARGET_IS_64_BIT))
+RS_PREBUILT_LIBPATH := -L prebuilts/ndk/9/platforms/android-21/arch-$(TARGET_ARCH)/usr/lib
+else
+RS_PREBUILT_LIBPATH := -L prebuilts/ndk/8/platforms/android-9/arch-$(TARGET_ARCH)/usr/lib
+endif
# API Level lists for Renderscript Compat lib.
RSCOMPAT_32BIT_ONLY_API_LEVELS := 8 9 10 11 12 13 14 15 16 17 18 19 20