[cfe-users] Why doesn't clang use colors for diagnostics by default?
don hinton via cfe-users
cfe-users at lists.llvm.org
Thu Sep 10 08:39:24 PDT 2015
Hi Victor:
Try setting TERM to a color terminal, e.g., xterm-color or xterm-256color
and see if that helps. I use xterm-256color inside tmux and it works fine.
hth...
don
On Thu, Sep 10, 2015 at 2:40 AM, Victor via cfe-users <
cfe-users at lists.llvm.org> wrote:
> I'm using command like this:
>
> $ clang++ prg.cpp
>
> My Clang is built from sources. What libraries it needs to use colors
> automatically? Or may be there is some option that I can specify for
> configure?
>
>
> On Wed, 9 Sep 2015 19:49:21 -0700
> Richard Trieu <rtrieu at google.com> wrote:
>
>> Are you invoking Clang with "clang foo.cc" or "clang -cc1 foo.cc"? The
>> first should detect if you have a color capable terminal and automatically
>> turn on color diagnostics while the second needs the flag explicitly. The
>> other possibility is that the Clang you are using was compiled with the
>> libraries needed to detect a color terminal, and defaults to no color.
>>
>> On Mon, Sep 7, 2015 at 5:15 AM, Victor via cfe-users <
>> cfe-users at lists.llvm.org> wrote:
>>
>> Hello, all.
>>>
>>> Why doesn't clang use colors for diagnostics by default?
>>> My environment:
>>>
>>> $ cat /etc/*-release
>>> Red Hat Enterprise Linux Server release 6.3 (Santiago)
>>>
>>> $ echo $TERM
>>> xterm
>>>
>>> Doc here
>>> http://clang.llvm.org/docs/UsersManual.html#formatting-of-diagnostics
>>> says: "This option, which defaults to on when a color-capable terminal is
>>> detected". Isn't xterm "a color-capable terminal"?
>>>
>>> If I give -fcolor-diagnostics explicitly, all works as expected. But why
>>> must I do that? GCC uses colors by default.
>>> _______________________________________________
>>> cfe-users mailing list
>>> cfe-users at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
>>>
>>>
> _______________________________________________
> cfe-users mailing list
> cfe-users at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20150910/710240da/attachment.html>
More information about the cfe-users
mailing list