[Nix-dev] make -j<n> howto?

Marc Weber marco-oweber at gmx.de
Mon Jun 16 20:28:54 CEST 2008


On Mon, Jun 16, 2008 at 04:25:20PM +0200, Peter Simons wrote:
> Hi,
> 
> how can I pass a, say -j8 flag, to make for all builds? I assumed that
> the max-build-jobs config option would do that, but apparently it
> doesn't -- unless I'm doing something wrong, of course.

No, using -j x could lead to different builds (doesn't in most cases
though).
max-build-jobs makes nix run more than one build at the same time.
But within one build only one file is compiled at the same time.

The only way to do this is adding that option to the builder.sh file or
such. (default buildPhase)

It would be interesting to have an experimental maybe unpure use
numcores environment option which would be 1 in all production cases
(buildfarm) but might be set to another value on your local developement
machine.

In the one case I did care yet (recompiling ghc) I've made a getConfig
option (forcing rebuild of everything after changing it ..)

Marc Weber



More information about the nix-dev mailing list