diff options
author | Jiyong Park <jiyong@google.com> | 2017-06-13 18:09:33 +0900 |
---|---|---|
committer | Jiyong Park <jiyong@google.com> | 2017-06-13 18:09:33 +0900 |
commit | 8d421ca1f0aa477c7927a1a897b44d6ee54ff83a (patch) | |
tree | 2592d689f10cbfec794a43674e8b27e55231374f /cpu_ref | |
parent | bd98d012d719c3efa139fea6c2fd422d0234fd75 (diff) | |
download | rs-8d421ca1f0aa477c7927a1a897b44d6ee54ff83a.tar.gz |
bcc vendor plugin must be loaded from the sphal namespace
bcc loads vendor plugin in its address space. Since bcc is a system
process, the vendor plugin must be loaded from the sphal namespace where
VNDK-SP libraries are provided. This is to ensure that the vendor plugin
is linked against to the VNDK-SP version of libraries. It also prevents
the vendor plugin from using non-VNDK-SP libs such as libLLVM.so.
Bug: 62517583
Test: a sample renderscript app (CameraScript) runs well
Change-Id: Id014cc4f3ea2d3980b11ef219422457e356124a5
Diffstat (limited to 'cpu_ref')
-rw-r--r-- | cpu_ref/rsCpuScript.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cpu_ref/rsCpuScript.cpp b/cpu_ref/rsCpuScript.cpp index 60d08be1..f2f3d2e9 100644 --- a/cpu_ref/rsCpuScript.cpp +++ b/cpu_ref/rsCpuScript.cpp @@ -108,7 +108,13 @@ static void setCompileArguments(std::vector<const char*>* args, // Only load additional libraries for compiles that don't use // the debug context. if (bccPluginName && strlen(bccPluginName) > 0) { +#ifdef __ANDROID__ + // For Android, -plugin option must be used in order to load the + // vendor plugin from the sphal namespace. + args->push_back("-plugin"); +#else args->push_back("-load"); +#endif args->push_back(bccPluginName); } } |