[Mesa-dev] [PATCH] clover: log build options when dumping clc source

Francisco Jerez currojerez at riseup.net
Wed May 27 05:38:40 PDT 2015


EdB <edb+mesa at sigluy.net> writes:

> ---
>  src/gallium/state_trackers/clover/llvm/invocation.cpp | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
> index 7d2d941..fc7ab9c 100644
> --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
> +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
> @@ -708,8 +708,10 @@ clover::compile_program_llvm(const std::string &source,
>  
>     llvm_ctx.setDiagnosticHandler(diagnostic_handler, &r_log);
>  
> -   if (get_debug_flags() & DBG_CLC)
> -      debug_log(source, ".cl");
> +   if (get_debug_flags() & DBG_CLC) {
> +      const std::string src = "// Build options: " + opts + '\n' + source;
> +      debug_log(src, ".cl");
> +   }

Thank you, pushed with a minor clean-up.

>  
>     // The input file name must have the .cl extension in order for the
>     // CompilerInvocation class to recognize it as an OpenCL source file.
> -- 
> 2.1.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150527/241288f3/attachment-0001.sig>


More information about the mesa-dev mailing list