Replacing JOBS=x with -j for make parallelism did not work
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Mon Jun 11 05:34:32 PDT 2012
On 2012-05-29 18:53, Kelly O'Hair wrote:
> On May 29, 2012, at 3:39 AM, Magnus Ihse Bursie wrote:
>
>
>> 1) Restore the previous fix with JOBS=x
>>
>> 2) Really extract the actual make command line using ugly hacks (like some shell script magic and reading from /proc). Might be hard to get it properly working on all platforms.
>>
>> 3) Support a combination, so that both "make -j2" and "make JOBS=2" works, but if you want singlethreaded execution, you *must* specify "make JOBS=1".
>>
> So I'd say 3) if I understand this all correctly.
Dammit, I should have written more clearly that I considered 3) a really
not good solution, listed only for completeness. ;-)
I discussed this with Erik and Jonas, and we agree that 1) is the way to
go. The problem with 3) is that it will bring two different ways of
accomplishing the same thing, out of which only one will work properly
all the time (JOBS=), and the other will silently fail in one case,
possibly the most important (-j1).
I am about to push a fix restoring behaviour to the old JOBS=x. This fix
will produce an error for running with -jX (where X>1), to stop
encouraging people from using something that will not work properly.
Unfortunately, it can not identify a user running with -j1 (since if it
could, we shouldn't be needing the JOBS workaround..)
I'ts a bit sad that the -jX fix did not work, but a working solution is
better than an elegant and broken one. :)
/Magnus
More information about the build-infra-dev
mailing list