[Mesa-dev] [PATCH] clover: Always print the compile log

Francisco Jerez currojerez at riseup.net
Mon Aug 26 18:12:21 PDT 2013


Tom Stellard <tom at stellard.net> writes:

> From: Tom Stellard <thomas.stellard at amd.com>
>
> This way users can see compiler warnings.
> ---
>  src/gallium/state_trackers/clover/llvm/invocation.cpp | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
> index e6cd415..290c31a 100644
> --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
> +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
> @@ -206,6 +206,9 @@ namespace {
>        if (!c.ExecuteAction(act))
>           throw build_error(log);
>  
> +      // Display any warnings
> +      std::cerr << log;
> +
>        // Get address spaces map to be able to find kernel argument address space
>        memcpy(address_spaces, c.getTarget().getAddressSpaceMap(), 
>                                                          sizeof(address_spaces));

Isn't this supposed to be part of the application's policy to decide how
where and when to print compilation errors and warnings?  Maybe wrap it
between #ifdef DEBUG/#endif or use gallium's debug_printf so it's only
printed out in debug builds?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 229 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130826/642f21e1/attachment.pgp>


More information about the mesa-dev mailing list