bcc_compat - convert bitcode to shared object files.

BUG: 7419958

Change-Id: Ie81203b460d60425780657b51ba3aba2b2b77e05
diff --git a/lib/Renderscript/RSScript.cpp b/lib/Renderscript/RSScript.cpp
index 75cfff9..53c8946 100644
--- a/lib/Renderscript/RSScript.cpp
+++ b/lib/Renderscript/RSScript.cpp
@@ -22,7 +22,7 @@
 
 using namespace bcc;
 
-bool RSScript::LinkRuntime(RSScript &pScript) {
+bool RSScript::LinkRuntime(RSScript &pScript, const char *rt_path) {
   // Using the same context with the source in pScript.
   BCCContext &context = pScript.getSource().getContext();
   const char* core_lib = RSInfo::LibCLCorePath;
@@ -37,6 +37,10 @@
   }
 #endif
 
+  if (rt_path != NULL) {
+    core_lib = rt_path;
+  }
+
   Source *libclcore_source = Source::CreateFromFile(context, core_lib);
   if (libclcore_source == NULL) {
     ALOGE("Failed to load Renderscript library '%s' to link!", core_lib);