[ccache] Support for color diagnostics

Lubos Lunak l.lunak at centrum.cz
Sat Nov 30 03:07:16 MST 2013


On Saturday 30 of November 2013, Loïc Yhuel wrote:
> Le 29/11/2013 14:08, Lubos Lunak a écrit :
> > On Friday 29 of November 2013, Lubos Lunak wrote:
> >>   Hello,
> >>
> >>   the attached patch adds ccache support for compiler color diagnostics
> >> (also reported by somebody as #10075).
...
> I think you didn't understand GCC documentation correctly.

 Actually I think I did. I've now tried with a chroot (openSUSE build service 
really is a useful tool) and it pretty much matches my understanding of the 
documentation.

>  From the man page : "The default GCC_COLORS is ... Setting GCC_COLORS
> to the empty string disables colors."
> GCC enable colors when GCC_COLORS is not set, and your code doesn't.

 From the man page: "The default is ‘never’ if GCC_COLORS environment variable 
isn't present in the environment".

> In fact you don't have to test GCC_COLORS at all : when it's an empty
> string (not unset !), colors are disabled , and adding
> -fdiagnostics-color doesn't change anything.

 The patch does not add -fdiagnostics-color when GCC_COLORS is empty.

-- 
 Lubos Lunak


More information about the ccache mailing list