GNU make job server-alike for GHC --make
Motivation
A problem when building large amounts of dependencies with stack or cabal is that we don't get to exploit any module level parallelism due to cabal using --make
mode without any -j
flags. It is sensible to not pass any -j
: cabal-install uses the parallelism between packages too so it isn't easy choosing how many threads to allow.
Proposal
Have some feature like the GNU make jobserver in GHC.
GNU make documentation: https://www.gnu.org/software/make/manual/html_node/Job-Slots.html
Notes
rust's cargo
is both a jobserver client and a jobserver server since
https://github.com/rust-lang/cargo/pull/4110
Ocaml decided the jobserver protocol was too hairy: https://github.com/ocaml/dune/pull/4331
Edited by Douglas Wilson