bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another issue with -O?


From: Eli Zaretskii
Subject: Re: Another issue with -O?
Date: Sat, 04 May 2013 09:57:07 +0300

> From: Paul Smith <address@hidden>
> Cc: address@hidden, address@hidden
> Date: Fri, 03 May 2013 16:51:47 -0400
> 
> > I think enabling [-O] by default will be a no-brainer if/when we come up
> > with a way to get it to produce the same output as without -j.  IOW,
> > run a parallel build, but output its results as if it were a
> > non-parallel build.
> 
> If you mean literally exactly the same as a non-parallel build, that is
> enormously difficult.

Yes, literally, but with one exception: the order of producing on the
screen output from targets that are remade in parallel (i.e. are
independent of each other), and are on the same level of recursion,
does not have to be preserved.

> Doing that would require that instead of dumping output in the order
> that jobs finish, make would have to remember the order in which they
> were started and dump the output in that order.

I meant "targets", not "jobs" (the latter are single command lines,
right?).  Dump output of a whole target as a single unit.  As for the
order, as long as the targets are remade in parallel, it doesn't
matter.

Example:

all: a b

a: xa
        @echo $@

xa xb xc:
        @echo $@

b: xb xc xd
        @echo $@

xd:
        $(MAKE) foo
        @echo $@

In the above case, I'd like to see

  xa
  a
  xb
  xc
  $(MAKE) foo
  xd
  b

but I wouldn't mind to see this instead:

  xa
  a
  xc
  xb
  $(MAKE) foo
  xd
  b

or this:

  $(MAKE) foo
  xd
  xc
  xb
  b
  xa
  a

By contrast, I _would_ mind to see this, for example:

  xa
  xb
  a
  xc
  xd
  $(MAKE)
  b

> My position is if we can get output sync to a level where it is no worse
> than today's parallel build behavior

If we want it to be "no worse", then why do we need it at all, let
alone have it turned on by default?  I thought -O should actually
improve something, so "no worse" is too weak to describe that, IMO.

And what are our criteria for deciding whether it's no worse?  The
current default behavior might be confusing and hard to interpret in
some cases, but at least it's familiar.  -O changes that to a
different behavior which is confusing (at least to me) in different
situations, and is unfamiliar.  How do we decide which one is worse?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]