On Mon, 21 Jan 2019 at 19:09, Laszlo Ersek <ler...@redhat.com> wrote: > It wasn't clear to me whether and how multi-threaded builds were > supposed to be used by maintainers, whenever they'd update > "tests/data/uefi-boot-images/*". > > I saw that "make" was invoked everywhere as $(MAKE), but that didn't > clarify any intent around "-j". So I didn't test "-j" at all, and in > fact I wouldn't have expected it to work:
The usual assumption with make is that "-jN" should work and at least (if the thing being built can't actually be parallelized usefully) be no worse than if you'd not specified a -j option. We have occasionally had problems with -jN in 'make check' (usually because several test cases were trying to use the same temp filename or similar) but we've treated them as bugs and squashed them. > The "build" base tool in edk2 implements part of the job with generated > makefiles and invoking "make" itself, thus, despite .NOTPARALLEL, it > likely inherits the outermost -j<N> setting -- and it doesn't expect such. > > So the best I can offer here is to check $MAKEFLAGS in "build.sh", and > exit with an early, explicit error if $MAKEFLAGS contains "-j", "-l", or > their long variants (--jobs, --load-average). Could you sanitize MAKEFLAGS in build.sh instead to remove the parallelization options? thanks -- PMM