Add a way to link against different driver names.
The existing linker path hard-coded "-lRSDriver" into the command line, but
this won't work for partner drivers that have a different implementation
loaded. In order to still properly handle use of the CPU driver, this needs
to change depending on whether we actually loaded an OVERRIDE_RS_DRIVER or
not.
Change-Id: I0c4a4f12f5db819b234952bc8f364ac6300f147b
diff --git a/cpu_ref/rsCpuScript.cpp b/cpu_ref/rsCpuScript.cpp
index 3f64534..3282374 100644
--- a/cpu_ref/rsCpuScript.cpp
+++ b/cpu_ref/rsCpuScript.cpp
@@ -385,7 +385,8 @@
return false;
}
- if (!SharedLibraryUtils::createSharedLibrary(cacheDir, resName)) {
+ if (!SharedLibraryUtils::createSharedLibrary(mCtx->getContext()->getDriverName(),
+ cacheDir, resName)) {
ALOGE("Linker: Failed to link object file '%s'", resName);
mCtx->unlockMutex();
return false;