[PATCH] D152285: Add support for the NO_COLOR environment variable

Jan Niklas Hasse via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 7 08:14:49 PDT 2023


jhasse added a comment.

In D152285#4403031 <https://reviews.llvm.org/D152285#4403031>, @aaron.ballman wrote:

> In D152285#4401348 <https://reviews.llvm.org/D152285#4401348>, @MaskRay wrote:
>
>> If we don't intend to support both standards, we can close https://github.com/llvm/llvm-project/issues/23983 (CLICOLOR) as a wontfix :)
>
> That was my plan.

As that issue was more about adding a way to force colors and not about disabling them, please leave it open.

> [...] I don't know what compelling use case there is for forcing colors *on*, [...] until we know why users need to force-enable colors.

The reason is that adding `-fcolor-diagnostics` to the command line is not always feasible, e.g. most build systems would rebuild everything in that case. Relying on tty detection also doesn't work as many build tools buffer the output (and some CIs, too).

In D152285#4403318 <https://reviews.llvm.org/D152285#4403318>, @MaskRay wrote:

> I don't mind how we handle `NO_COLOR=1 CLICOLOR_FORCE=1`. This seems invalid input from the user and making either option win should be fine (I'd prefer that `NO_COLOR` wins.)

I'd prefer NO_COLOR winning, too. I can specify that case at https://bixense.com/clicolors/.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152285/new/

https://reviews.llvm.org/D152285



More information about the cfe-commits mailing list