diff options
author | Zhigang Gong <zhigang.gong@intel.com> | 2013-11-26 18:39:59 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2013-11-27 16:27:02 +0800 |
commit | 47a0573bf406dc6185733d8d4059ba9385b1fdc7 (patch) | |
tree | c281d82667bc962e1d6cd89a94c5e6e3cc9341b8 /src/cl_program.h | |
parent | 2b2fe68a424444c901a50a045124be17a7790ac6 (diff) |
Runtime: implement the get build log function and fix one build error check issue.
According to spec, we need to support CL_PROGRAM_BUILD_LOG which is
used to get the build log of a cl kernel. And we also need to check
whether a build failure is a generic build fail or a build option
error. This commit also fix the piglit case:
API/clBuildProgram.
Another change in this commit is that it reroute all the output
of the clang excution to internal buffer and don't print to the
console directly. If the user want to get the detail build log,
the CL_PROGRAM_BUILD_LOG could be used.
v2: include both clang error messages and the llvm-to-gen error
messages. Also refine the checking for the error buffer parameter.
If there is no error buffer specified, always flush the build log
to llvm::errs().
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'src/cl_program.h')
-rw-r--r-- | src/cl_program.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cl_program.h b/src/cl_program.h index 2cb547a0..a6d75da8 100644 --- a/src/cl_program.h +++ b/src/cl_program.h @@ -54,6 +54,9 @@ struct _cl_program { uint32_t source_type:2; /* Built from binary, source or LLVM */ uint32_t is_built:1; /* Did we call clBuildProgram on it? */ char *build_opts; /* The build options for this program */ + size_t build_log_max_sz; /*build log maximum size in byte.*/ + char *build_log; /* The build log for this program. */ + size_t build_log_sz; /* The actual build log size.*/ }; /* Create a empty program */ |