Replacing JOBS=x with -j for make parallelism did not work
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Tue May 29 03:39:37 PDT 2012
On 04/26/12 14:43, magnus.ihse.bursie at oracle.com wrote:
>> Changeset: 33eaa832ce5e
>> Author: ihse
>> Date: 2012-04-26 14:43 +0200
>> URL: http://hg.openjdk.java.net/build-infra/jdk8/rev/33eaa832ce5e
>>
>> Replace previous fix (JOBS=) with a solution that actually respects
>> -j if
>> set on top-level Makefile.
Unfortunately, it turned out that this fix does not really work. :-(
If you run "make -j2", it works well. That was my test case, when doing
the fix. However, when you run "make -j1", it does not -- this case is
indistinguishable from just "make". Unfortunately, it is also one of the
typical cases for wanting to override -j, to force non-parallel execution.
I can see a a bunch of possible solutions, none of them really optimal:
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".
Out of these, I'd prefer 1). Anyone else has an opinion?
/Magnus
More information about the build-infra-dev
mailing list