Hi

On Tue, Aug 25, 2020 at 12:07 PM Gerd Hoffmann <kra...@redhat.com> wrote:

> On Tue, Aug 25, 2020 at 10:59:42AM +0400, Marc-André Lureau wrote:
> > Hi
> >
> > On Tue, Aug 25, 2020 at 10:44 AM Gerd Hoffmann <kra...@redhat.com>
> wrote:
> >
> > > Dunno why the default is set to "always".  IMHO it should be "auto",
> > > i.e. only colorize in case stdout goes to a terminal.  Cluttering
> > > logfiles and confusing compiler message parsers with terminal control
> > > sequences is not nice ...
> > >
> > > Signed-off-by: Gerd Hoffmann <kra...@redhat.com>
> > >
> >
> > "Enable colored output with GCC. Ninja redirects stdout/stderr so by
> > default GCC thinks it is not talking to a terminal"
> >
> >
> https://github.com/mesonbuild/meson/commit/4f63fe498314c385de2d3b6a3a953d15985914d2
>
> Hmm, maybe ninja handles this then, by stripping the terminal sequences
> in case stdout isn't a terminal.
>
> With ninja being the default backend the default kind-of makes sense
> (for meson upstream) ...
>
> > Since we use make, I don't know if it's any better.
>
> ... but given qemu uses make not ninja we might prefer something else ;)
>
> As far I know make doesn't redirect output.  Or maybe it redirects using
> a pty (instead of a pipe) in case stdout is a terminal.  At least auto
> mode for colored gcc warnings works fine with make.  It is colored when
> started in a terminal, it isn't when started in emacs (and piped through
> the emacs message parser).
>
>
Then it looks like you have a legit patch. We can revert it when we switch
back to ninja some day.

Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com>

> Perhaps meson should set compiler/tools colors = always/never based on
> what
> > it is connected to at configure time instead?
>
> Why?  Even when running configure in a terminal I might use emacs for
> builds later on.
>
> take care,
>   Gerd
>
>

-- 
Marc-André Lureau

Reply via email to