build-api
build-api copied to clipboard
ninja and parallel builds
It turns out to be impossible to write a Makefile wrapper for ninja that passes the '-j -l' to ninja, because there's no way to extract those flags within the Makefile - MAKEFLAGS just has '-j --jobserver-fds=3,4' or something like that.
This isn't too much of a problem because ninja defaults to parallel operation, so passing in the -j/-l flags would just tweak that. Two ideas about how it could be fixed:
- Just add explicit ninja support to the build-api - if ninja.build is found, then use ninja instead of Makefile. (Setting DESTDIR in the environment - variables on the command line aren't a ninja concept, but ninja files generated by CMake or meson support DESTDIR in the environment) It may be a bit early for this.
- Specify that a consumer will run make as 'make -j N -l L JOBS=N MAX_LOADAVG=L'
This doesn't matter a whole lot - could just wait and see if ninja actually fully takes off before doing the first.