summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix/build/gnu-build-system.scm9
1 files changed, 7 insertions, 2 deletions
diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index 10542b3ec2..63bbeae605 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -28,6 +28,7 @@
#:use-module (ice-9 regex)
#:use-module (ice-9 format)
#:use-module (ice-9 ftw)
+ #:use-module (ice-9 threads)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-19)
#:use-module (srfi srfi-34)
@@ -386,7 +387,9 @@ makefiles."
#:allow-other-keys)
(apply invoke "make"
`(,@(if parallel-build?
- `("-j" ,(number->string (parallel-job-count)))
+ `("-j" ,(number->string (parallel-job-count))
+ ,(string-append "--max-load="
+ (number->string (total-processor-count))))
'())
,@make-flags)))
@@ -425,7 +428,9 @@ makefiles."
(raise c)))
(apply invoke "make" test-target
`(,@(if parallel-tests?
- `("-j" ,(number->string (parallel-job-count)))
+ `("-j" ,(number->string (parallel-job-count))
+ ,(string-append "--max-load="
+ (number->string (total-processor-count))))
'())
,@make-flags)))
(format #t "test suite not run~%")))