GNU bug report logs - #49616
[PATCH] gnu: go-1.16: Honor #:parallel-build?

Previous Next

Package: guix-patches;

Reported by: Sarah Morgensen <iskarian <at> mgsn.dev>

Date: Sun, 18 Jul 2021 04:07:01 UTC

Severity: normal

Tags: patch

Done: Efraim Flashner <efraim <at> flashner.co.il>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Sarah Morgensen <iskarian <at> mgsn.dev>
Subject: bug#49616: closed (Re: [bug#49616] [PATCH] gnu: go-1.16: Honor
 #:parallel-build?)
Date: Thu, 05 Aug 2021 14:06:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#49616: [PATCH] gnu: go-1.16: Honor #:parallel-build?

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 49616 <at> debbugs.gnu.org.

-- 
49616: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=49616
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Efraim Flashner <efraim <at> flashner.co.il>
To: Sarah Morgensen <iskarian <at> mgsn.dev>
Cc: 49616-done <at> debbugs.gnu.org
Subject: Re: [bug#49616] [PATCH] gnu: go-1.16: Honor #:parallel-build?
Date: Thu, 5 Aug 2021 17:03:53 +0300
[Message part 3 (text/plain, inline)]
Cut the build phase down from 83 seconds to 41 for me.

Patch pushed!

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]
[Message part 5 (message/rfc822, inline)]
From: Sarah Morgensen <iskarian <at> mgsn.dev>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: go-1.16: Honor #:parallel-build?
Date: Sat, 17 Jul 2021 21:05:59 -0700
* 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




This bug report was last modified 3 years and 286 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.