makeparallel inherits values for MAKEFLAGS and MAKELEVEL from make
through the environment, but they should not be propagated to the child
process in case the child process tries to run make again.
Change-Id: I4c5df10ea8055cd1f1f61a892d5b1a7acb287bbb
This uses far fewer hacks in order to build these host tools, but will
require more libraries(libc++,etc) from unbundled and stripped down
branches.
Once this becomes the only option, all builds will happen after soong
runs. Then the toolchain / global cflags information will be able to be
moved from make to soong (and exported back to make).
Change-Id: I270b1d92bcef28a96fbc3ec9910d9bd0c101ac0f
If ninja is missing makeparallel prints an unhelpful error:
out/host/linux-x86/bin/makeparallel: exec failed: No such file or directory
which suggests that makeparallel is what is missing, not what is
reporting the error. Print the path passed to exec as well.
Change-Id: Ic04c1cde6da9c3a974b5c43e3fb3bdb6da6605f7
Ninja stops parsing top level options after -t is used to select a
tool. Put any inserted command line options at the beginning of the
command.
Change-Id: I2ba903143366aaded63e21d749476248617c8962
Allow makeparallel to pass better -j and -k arguments to ninja if the
first argument to makeparallel is --ninja. Uses getopt to parse
MAKEFLAGS to get values for --jobserver-fds, -k, and -j, and uses the
result to not pass any -j argument to ninja for make -j with no number,
and pass -k0 to ninja for make -k.
Also improve the test makefile to provide many more tests.
Bug: 24199503
Change-Id: Id6481430f77e9e952213be58a98fe78c46ee5d6a
makeparallel communicates with the GNU make jobserver
(http://make.mad-scientist.net/papers/jobserver-implementation/)
in order claim all available jobs, and then passes the number of jobs
claimed to a subprocess with -j<jobs>.
Change-Id: Id41a2d81e0d835517da8ba52c818c763fc455c14