diff options
| author | Stephen Hines <srhines@google.com> | 2014-05-21 21:23:08 -0700 |
|---|---|---|
| committer | Stephen Hines <srhines@google.com> | 2014-05-21 21:23:08 -0700 |
| commit | 25e3af55a43faddced1a9931574dfdc3cc8ad8fd (patch) | |
| tree | 13535b2cbc80dd06c7cf175f39ed820a15a8e5ea /cpu_ref/rsCpuScript.cpp | |
| parent | 581eeb5d5ad71e2b8129abbef2f757a1a5b25b82 (diff) | |
Switch to the separate RS loading path.
This change goes with a similar change to libbcc that separates compilation
from loading. We create our own symbol resolvers in the driver.
Change-Id: Ifdeed588d5935c49a1e19bdc46d0a8f0b9252e00
Diffstat (limited to 'cpu_ref/rsCpuScript.cpp')
| -rw-r--r-- | cpu_ref/rsCpuScript.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/cpu_ref/rsCpuScript.cpp b/cpu_ref/rsCpuScript.cpp index 70c9d8f8..01a3e5a1 100644 --- a/cpu_ref/rsCpuScript.cpp +++ b/cpu_ref/rsCpuScript.cpp @@ -418,8 +418,11 @@ bool RsdCpuScriptImpl::init(char const *resName, char const *cacheDir, return false; } - mCompilerDriver->setRSRuntimeLookupFunction(lookupRuntimeStub); - mCompilerDriver->setRSRuntimeLookupContext(this); + // Configure symbol resolvers (via compiler-rt and the RS runtime). + mRSRuntime.setLookupFunction(lookupRuntimeStub); + mRSRuntime.setContext(this); + mResolver.chainResolver(mCompilerRuntime); + mResolver.chainResolver(mRSRuntime); // Run any compiler setup functions we have been provided with. RSSetupCompilerCallback setupCompilerCallback = @@ -471,8 +474,8 @@ bool RsdCpuScriptImpl::init(char const *resName, char const *cacheDir, // Skip the cache lookup } else if (!is_force_recompile()) { // Attempt to just load the script from cache first if we can. - exec = mCompilerDriver->loadScript(cacheDir, resName, - (const char *)bitcode, bitcodeSize); + exec = bcc::RSCompilerDriver::loadScript(cacheDir, resName, + (const char *)bitcode, bitcodeSize, mResolver); } if (exec == NULL) { @@ -480,9 +483,8 @@ bool RsdCpuScriptImpl::init(char const *resName, char const *cacheDir, bitcodeSize, core_lib, useRSDebugContext, bccPluginName); if (built) { - exec = mCompilerDriver->loadScript(cacheDir, resName, - (const char *)bitcode, - bitcodeSize); + exec = bcc::RSCompilerDriver::loadScript(cacheDir, resName, + (const char *)bitcode, bitcodeSize, mResolver); } } |
