<div dir="ltr">On Mon, Sep 2, 2013 at 11:41 AM, Nico Rieck <span dir="ltr"><<a href="mailto:nico.rieck@gmail.com" target="_blank" class="cremed">nico.rieck@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 02.09.2013 20:26, Chandler Carruth wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Why is this preferred to just passing -fcolor-diagnostics?<br>
</blockquote>
<br></div>
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.</blockquote><div><br></div><div>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?<br>
</div><div><br></div><div>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.</div></div></div></div>