[Beignet] [PATCH v2 3/5] fix build error log not output issue.

xionghu.luo at intel.com xionghu.luo at intel.com
Wed Mar 8 15:00:39 UTC 2017


From: Luo Xionghu <xionghu.luo at intel.com>

v2: output build option and err if variable set.

Signed-off-by: Luo Xionghu <xionghu.luo at intel.com>
---
 backend/src/backend/program.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/backend/src/backend/program.cpp b/backend/src/backend/program.cpp
index 09c79d8..8a4ad83 100644
--- a/backend/src/backend/program.cpp
+++ b/backend/src/backend/program.cpp
@@ -1114,8 +1114,8 @@ EXTEND_QUOTE:
                                     stringSize, err, errSize, optLevel, options);
       if (err != NULL)
         *errSize += clangErrSize;
-      if (OCL_OUTPUT_BUILD_LOG && options)
-        llvm::errs() << options;
+      if (OCL_OUTPUT_BUILD_LOG && err)
+        llvm::errs() << options << "\n" << err;
     } else
       p = NULL;
 
@@ -1168,8 +1168,8 @@ EXTEND_QUOTE:
 
       p = gbe_program_new_gen_program(deviceID, out_module, NULL, NULL);
 
-      if (OCL_OUTPUT_BUILD_LOG && options)
-        llvm::errs() << options;
+      if (OCL_OUTPUT_BUILD_LOG && err)
+        llvm::errs() << options << "\n" << err;
     } else
       p = NULL;
     releaseLLVMContextLock();
-- 
2.5.0



More information about the Beignet mailing list