bug-make
[Top][All Lists]
Advanced

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

Re: [bug #40225] Deterministic output ordering


From: Philip Guenther
Subject: Re: [bug #40225] Deterministic output ordering
Date: Sat, 12 Oct 2013 19:20:52 -0700

On Sat, Oct 12, 2013 at 7:01 PM, Frank Heckenbach
<address@hidden> wrote:
> - My suggestion relies on the order the jobs are *started* (which,
>   as I said, ought to be deterministic and the same as with "-j0",
>   though Paul should know this better than me).

Maybe you're talking about some restricted subcase, but *IN GENERAL*,
the order in which jobs are started by make when running with -jN is
dependent on how long it takes to execute the subjobs.

Trivial example:

all: a b
a: a1.o a2.o
        ${LINK.c} -o $@ $^
b: b1.o b2.o
        ${LINK.c} -o $@ $^


Let's say building a1.o takes 1.5 second, but the others each takes 1 second.
Then the start order when you do "make -j2 all" will be:
        a1.o a2.o b1.o a b2.o b

If building a1.o takes 2.5 second then the order will be:
        a1.o a2.o b1.o b2.o a b

If building a1.o takes 3.5 second then the order will be:
        a1.o a2.o b1.o b2.o b a

Without -j, the order will always be
        a1.o a2.o a b1.o b2.o b


Philip Guenther



reply via email to

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