Attempt #2: Unbundled RS compatibility library support

Bug: 7419958
Change-Id: I03ba956f56eebcf894f4e51d07592e5282a30453
diff --git a/renderscript/Android.mk b/renderscript/Android.mk
new file mode 100644
index 0000000..2bc9c5d
--- /dev/null
+++ b/renderscript/Android.mk
@@ -0,0 +1,56 @@
+#
+# Copyright (C) 2013 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+LOCAL_PATH:= $(call my-dir)
+
+ifneq (,$(TARGET_BUILD_APPS))
+
+##################################
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := librsjni
+LOCAL_SRC_FILES := lib/$(LOCAL_MODULE).so
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .so
+
+include $(BUILD_PREBUILT)
+
+##################################
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libRSSupport
+LOCAL_SRC_FILES := lib/$(LOCAL_MODULE).so
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .so
+
+include $(BUILD_PREBUILT)
+
+##################################
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := android.support.v8.renderscript
+LOCAL_SRC_FILES := lib/javalib.jar
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+LOCAL_MODULE_TAGS := optional
+#LOCAL_MODULE_SUFFIX := .jar
+
+include $(BUILD_PREBUILT)
+
+##################################
+
+endif # TARGET_BUILD_APPS
diff --git a/renderscript/lib/javalib.jar b/renderscript/lib/javalib.jar
new file mode 100644
index 0000000..73bfb75
--- /dev/null
+++ b/renderscript/lib/javalib.jar
Binary files differ
diff --git a/renderscript/lib/libRSSupport.so b/renderscript/lib/libRSSupport.so
new file mode 100755
index 0000000..c03c83c
--- /dev/null
+++ b/renderscript/lib/libRSSupport.so
Binary files differ
diff --git a/renderscript/lib/libclcore.bc b/renderscript/lib/libclcore.bc
new file mode 100644
index 0000000..153c486
--- /dev/null
+++ b/renderscript/lib/libclcore.bc
Binary files differ
diff --git a/renderscript/lib/libcompiler-rt.a b/renderscript/lib/libcompiler-rt.a
new file mode 100644
index 0000000..4824c70
--- /dev/null
+++ b/renderscript/lib/libcompiler-rt.a
Binary files differ
diff --git a/renderscript/lib/librsjni.so b/renderscript/lib/librsjni.so
new file mode 100755
index 0000000..10e738f
--- /dev/null
+++ b/renderscript/lib/librsjni.so
Binary files differ
diff --git a/tools/Android.mk b/tools/Android.mk
index 6d47b3d..c8e47f3 100644
--- a/tools/Android.mk
+++ b/tools/Android.mk
@@ -63,6 +63,44 @@
 ##################################
 include $(CLEAR_VARS)
 
+LOCAL_MODULE := bcc_compat
+LOCAL_SRC_FILES := $(HOST_OS)/$(LOCAL_MODULE)$(HOST_EXECUTABLE_SUFFIX)
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_MODULE_TAGS := optional
+LOCAL_REQUIRED_MODULES := libbcc libbcinfo
+LOCAL_MODULE_SUFFIX := $(HOST_EXECUTABLE_SUFFIX)
+LOCAL_BUILT_MODULE_STEM := $(LOCAL_MODULE)$(HOST_EXECUTABLE_SUFFIX)
+LOCAL_IS_HOST_MODULE := true
+
+include $(BUILD_PREBUILT)
+
+##################################
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libbcc
+LOCAL_SRC_FILES := $(HOST_OS)/$(LOCAL_MODULE).so
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_IS_HOST_MODULE := true
+
+include $(BUILD_PREBUILT)
+
+##################################
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libbcinfo
+LOCAL_SRC_FILES := $(HOST_OS)/$(LOCAL_MODULE).so
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_IS_HOST_MODULE := true
+
+include $(BUILD_PREBUILT)
+
+##################################
+include $(CLEAR_VARS)
+
 LOCAL_MODULE := llvm-rs-cc
 LOCAL_SRC_FILES := $(HOST_OS)/llvm-rs-cc$(HOST_EXECUTABLE_SUFFIX)
 LOCAL_MODULE_CLASS := EXECUTABLES
diff --git a/tools/linux/bcc_compat b/tools/linux/bcc_compat
new file mode 100755
index 0000000..c782001
--- /dev/null
+++ b/tools/linux/bcc_compat
Binary files differ
diff --git a/tools/linux/libbcc.so b/tools/linux/libbcc.so
new file mode 100755
index 0000000..be5b76a
--- /dev/null
+++ b/tools/linux/libbcc.so
Binary files differ
diff --git a/tools/linux/libbcinfo.so b/tools/linux/libbcinfo.so
new file mode 100755
index 0000000..460b2be
--- /dev/null
+++ b/tools/linux/libbcinfo.so
Binary files differ
diff --git a/tools/linux/llvm-rs-cc b/tools/linux/llvm-rs-cc
index c8bef23..b8e4cd1 100755
--- a/tools/linux/llvm-rs-cc
+++ b/tools/linux/llvm-rs-cc
Binary files differ