summaryrefslogtreecommitdiff
path: root/nix/libstore/globals.cc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-10-15 22:40:35 +0200
committerLudovic Courtès <ludo@gnu.org>2018-10-15 22:40:35 +0200
commit6ef61cc4c30e94acbd7437f19c893f63a7112267 (patch)
tree84438580eccfeb44780d0434293e7fd84bb7be53 /nix/libstore/globals.cc
parent2ab321ca37d1c00c1540d78d587226d3d487b2d4 (diff)
downloadguix-patches-6ef61cc4c30e94acbd7437f19c893f63a7112267.tar
guix-patches-6ef61cc4c30e94acbd7437f19c893f63a7112267.tar.gz
daemon: Support multiplexed build output.
This allows clients to tell whether output comes from the daemon or, if it comes from a builder, from which builder it comes. The latter is particularly useful when MAX-BUILD-JOBS > 1. * nix/libstore/build.cc (DerivationGoal::tryBuildHook) (DerivationGoal::startBuilder): Print the child's PID in "@ build-started" traces. (DerivationGoal::handleChildOutput): Define 'prefix', pass it to 'writeToStderr'. * nix/libstore/globals.cc (Settings:Settings): Initialize 'multiplexedBuildOutput'. (Settings::update): Likewise. * nix/libstore/globals.hh (Settings)[multiplexedBuildOutput]: New field. Update 'printBuildTrace' documentation. * nix/libstore/worker-protocol.hh (PROTOCOL_VERSION): Bump to 0.163. * nix/nix-daemon/nix-daemon.cc (performOp) <wopSetOptions>: Special-case "multiplexed-build-output" and remove "use-ssh-substituter". * guix/store.scm (set-build-options): Add #:multiplexed-build-output? and honor it. (%protocol-version): Bump to #x163. * tests/store.scm ("multiplexed-build-output"): New test. fixlet
Diffstat (limited to 'nix/libstore/globals.cc')
-rw-r--r--nix/libstore/globals.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/nix/libstore/globals.cc b/nix/libstore/globals.cc
index 94c2e516f8..4b5b485e65 100644
--- a/nix/libstore/globals.cc
+++ b/nix/libstore/globals.cc
@@ -36,6 +36,7 @@ Settings::Settings()
buildTimeout = 0;
useBuildHook = true;
printBuildTrace = false;
+ multiplexedBuildOutput = false;
reservedSize = 8 * 1024 * 1024;
fsyncMetadata = true;
useSQLiteWAL = true;
@@ -120,6 +121,7 @@ void Settings::update()
_get(maxBuildJobs, "build-max-jobs");
_get(buildCores, "build-cores");
_get(thisSystem, "system");
+ _get(multiplexedBuildOutput, "multiplexed-build-output");
_get(maxSilentTime, "build-max-silent-time");
_get(buildTimeout, "build-timeout");
_get(reservedSize, "gc-reserved-space");