From: Sarah Morgensen via Guix-patches via <guix-patches@gnu.org>
To: 49616@debbugs.gnu.org
Subject: [bug#49616] [PATCH] gnu: go-1.16: Honor #:parallel-build?
Date: Sat, 17 Jul 2021 21:05:59 -0700 [thread overview]
Message-ID: <e6be2c6352c0f403bfe49b4e5a5aee8df973ce16.1626580876.git.iskarian@mgsn.dev> (raw)
* gnu/packages/golang.scm (go-1.16)[arguments]<#:phases>{build}: Honor
parallel-build?
---
Does what it says on the tin. (Looks like I missed in the original go-1.16
submission.)
gnu/packages/golang.scm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index a830afa022..7bbd62f3cd 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -1513,10 +1513,12 @@ in the style of communicating sequential processes (@dfn{CSP}).")
(substitute* "time/zoneinfo_unix.go"
(("/usr/share/zoneinfo/") tzdata-path)))))
(replace 'build
- (lambda* (#:key inputs outputs #:allow-other-keys)
+ (lambda* (#:key inputs outputs (parallel-build? #t)
+ #:allow-other-keys)
;; FIXME: Some of the .a files are not bit-reproducible.
;; (Is this still true?)
- (let* ((output (assoc-ref outputs "out"))
+ (let* ((njobs (if parallel-build? (parallel-job-count) 1))
+ (output (assoc-ref outputs "out"))
(loader (string-append (assoc-ref inputs "libc")
,(glibc-dynamic-linker))))
(setenv "CC" (which "gcc"))
@@ -1525,6 +1527,7 @@ in the style of communicating sequential processes (@dfn{CSP}).")
(setenv "GOROOT" (dirname (getcwd)))
(setenv "GOROOT_FINAL" output)
(setenv "GOCACHE" "/tmp/go-cache")
+ (setenv "GOMAXPROCS" (number->string njobs))
(invoke "sh" "make.bash" "--no-banner"))))
(replace 'check
(lambda* (#:key target (tests? (not target)) (parallel-tests? #t)
base-commit: 9cb35c02164d929fcb8929e7f454df215df8cf25
--
2.31.1
next reply other threads:[~2021-07-18 4:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-18 4:05 Sarah Morgensen via Guix-patches via [this message]
2021-08-05 14:03 ` bug#49616: [PATCH] gnu: go-1.16: Honor #:parallel-build? Efraim Flashner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e6be2c6352c0f403bfe49b4e5a5aee8df973ce16.1626580876.git.iskarian@mgsn.dev \
--to=guix-patches@gnu.org \
--cc=49616@debbugs.gnu.org \
--cc=iskarian@mgsn.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).