summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuiling Song <ruiling.song@intel.com>2014-09-17 11:33:49 +0800
committerZhigang Gong <zhigang.gong@intel.com>2014-09-18 12:23:53 +0800
commiteebdde1fe000fde48f3e1370619d07a1defb2d97 (patch)
tree2c75f527f992154748f153d9d066075f1a62d8b3
parent4d7dbc769144346e65f122f2eb9bd19f234b4250 (diff)
GBE: Output linkModules's error message.
Signed-off-by: Ruiling Song <ruiling.song@intel.com> Reviewed-by: Junyan He <junyan.he@linux.intel.com>
-rw-r--r--backend/src/llvm/llvm_bitcode_link.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/backend/src/llvm/llvm_bitcode_link.cpp b/backend/src/llvm/llvm_bitcode_link.cpp
index d8454790..1365b321 100644
--- a/backend/src/llvm/llvm_bitcode_link.cpp
+++ b/backend/src/llvm/llvm_bitcode_link.cpp
@@ -204,9 +204,10 @@ namespace gbe
/* We use beignet's bitcode as dst because it will have a lot of
lazy functions which will not be loaded. */
- if(Linker::LinkModules(clonedLib, mod, Linker::DestroySource, NULL)) {
+ std::string errorMsg;
+ if(Linker::LinkModules(clonedLib, mod, Linker::DestroySource, &errorMsg)) {
delete clonedLib;
- printf("Fatal Error: link the bitcode error\n");
+ printf("Fatal Error: link the bitcode error:\n%s\n", errorMsg.c_str());
return NULL;
}