daemon: Default to '--cores=0'.

Suggested by Deck Pickard <deck.r.pickard@gmail.com>.

* nix/nix-daemon/guix-daemon.cc (main): Set 'settings.buildCores' to 0.
* doc/guix.texi (Invoking guix-daemon): Adjust accordingly.
This commit is contained in:
Ludovic Courtès 2014-11-30 18:34:31 +01:00
parent 5f86a66efd
commit 6efc160efe
2 changed files with 4 additions and 1 deletions

View File

@ -586,7 +586,7 @@ Cache build failures. By default, only successful builds are cached.
Use @var{n} CPU cores to build each derivation; @code{0} means as many Use @var{n} CPU cores to build each derivation; @code{0} means as many
as available. as available.
The default value is @code{1}, but it may be overridden by clients, such The default value is @code{0}, but it may be overridden by clients, such
as the @code{--cores} option of @command{guix build} (@pxref{Invoking as the @code{--cores} option of @command{guix build} (@pxref{Invoking
guix build}). guix build}).

View File

@ -264,6 +264,9 @@ main (int argc, char *argv[])
/* Turn automatic deduplication on by default. */ /* Turn automatic deduplication on by default. */
settings.autoOptimiseStore = true; settings.autoOptimiseStore = true;
/* Default to using as many cores as possible. */
settings.buildCores = 0;
argvSaved = argv; argvSaved = argv;
try try