diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-11-16 11:40:53 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-11-16 11:40:53 +0100 |
commit | 98750a9d9967b84a077735a2e4e6d5526256a5fd (patch) | |
tree | 9da0c6d62d794770b6d894cdb75e4a7fb65bd6bc | |
parent | 977eb5d023cfdf8e336f1896480eea9cef5c04e9 (diff) | |
download | guix-98750a9d9967b84a077735a2e4e6d5526256a5fd.tar.gz |
self: Limit the number of threads used when translating manuals.
* guix/self.scm (translate-texi-manuals)[build](parallel-jobs): New variable. Use it as first argument to 'n-par-for-each'.
-rw-r--r-- | guix/self.scm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/guix/self.scm b/guix/self.scm index bbfd2f1b95..026dcd9c1a 100644 --- a/guix/self.scm +++ b/guix/self.scm @@ -400,6 +400,12 @@ a list of extra files, such as '(\"contributing\")." (find-files directory "\\.[a-z]{2}(_[A-Z]{2})?\\.po$"))) + (define parallel-jobs + ;; Limit thread creation by 'n-par-for-each'. Going beyond can + ;; lead libgc 8.0.4 to abort with: + ;; mmap(PROT_NONE) failed + (min (parallel-job-count) 4)) + (mkdir #$output) (copy-recursively #$documentation "." #:log (%make-void-port "w")) @@ -415,14 +421,14 @@ a list of extra files, such as '(\"contributing\")." (setenv "LC_ALL" "en_US.UTF-8") (setlocale LC_ALL "en_US.UTF-8") - (n-par-for-each (parallel-job-count) + (n-par-for-each parallel-jobs (match-lambda ((language . po) (translate-texi "guix" po language #:extras '("contributing")))) (available-translations "." "guix-manual")) - (n-par-for-each (parallel-job-count) + (n-par-for-each parallel-jobs (match-lambda ((language . po) (translate-texi "guix-cookbook" po language))) |