[PATCH] Allow using ANSI escape sequences on Windows

Chandler Carruth chandlerc at google.com
Mon Sep 2 11:45:24 PDT 2013


On Mon, Sep 2, 2013 at 11:41 AM, Nico Rieck <nico.rieck at gmail.com> wrote:

> On 02.09.2013 20:26, Chandler Carruth wrote:
>
>> Why is this preferred to just passing -fcolor-diagnostics?
>>
>
> Just using -fcolor-diagnostics doesn't work in this case because Ninja
> internally uses pipes for stdout/stderr and the Windows console API only
> works on the console buffer.


On nix-ish platforms, -fcolor-diagnostics actually enables colors even for
pipes, and so works with Ninja or other build systems that use pipes. Is
the problem that you need to switch from console APIs to produce the colors
to ANSI escapes? How about a -fansi-escape-colors or some such?

Generally, I'd like to avoid the use of the environment variables. Command
line switches and such are easier to test, set, and audit in most cases.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130902/db1a30bc/attachment.html>


More information about the llvm-commits mailing list