summaryrefslogtreecommitdiff
path: root/cpu_ref/rsCpuScript.cpp
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2014-05-01 16:38:56 -0700
committerStephen Hines <srhines@google.com>2014-05-01 16:40:46 -0700
commit748a43678b33a7d814f4466f2846b8c955a9e1e8 (patch)
tree8d4e618655375d6586c247e60865d2f824112870 /cpu_ref/rsCpuScript.cpp
parent2d08f007e16273691bbfeba45d43257dafee1dc6 (diff)
Revert "Switch to standalone bcc compilation path."
The current standalone bcc on the device needs to be able to select from multiple possible target triples before we enable it by default. Bug: 14470052 This reverts commit 99281b5bc2a81a42fa490ddbc1496621c2d84486. Change-Id: I68f98b3c4f78d708aa5f544d36570e3db9c3e7d1
Diffstat (limited to 'cpu_ref/rsCpuScript.cpp')
-rw-r--r--cpu_ref/rsCpuScript.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/cpu_ref/rsCpuScript.cpp b/cpu_ref/rsCpuScript.cpp
index c1efcbef..d4888e14 100644
--- a/cpu_ref/rsCpuScript.cpp
+++ b/cpu_ref/rsCpuScript.cpp
@@ -216,6 +216,8 @@ static bool is_force_recompile() {
#endif // RS_SERVER
}
+//#define EXTERNAL_BCC_COMPILER 1
+#ifdef EXTERNAL_BCC_COMPILER
const static char *BCC_EXE_PATH = "/system/bin/bcc";
static bool compileBitcode(const char *cacheDir,
@@ -306,6 +308,7 @@ static bool compileBitcode(const char *cacheDir,
}
}
}
+#endif // EXTERNAL_BCC_COMPILER
#endif // !defined(RS_COMPATIBILITY_LIB)
#endif
@@ -473,9 +476,16 @@ bool RsdCpuScriptImpl::init(char const *resName, char const *cacheDir,
}
if (exec == NULL) {
+#ifdef EXTERNAL_BCC_COMPILER
bool built = compileBitcode(cacheDir, resName, (const char *)bitcode,
bitcodeSize, core_lib, useRSDebugContext,
bccPluginName);
+#else
+ bool built = mCompilerDriver->build(*mCompilerContext, cacheDir,
+ resName, (const char *)bitcode,
+ bitcodeSize, core_lib,
+ mCtx->getLinkRuntimeCallback());
+#endif // EXTERNAL_BCC_COMPILER
if (built) {
exec = mCompilerDriver->loadScript(cacheDir, resName,
(const char *)bitcode,