all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#49616] [PATCH] gnu: go-1.16: Honor #:parallel-build?
@ 2021-07-18  4:05 Sarah Morgensen via Guix-patches via
  2021-08-05 14:03 ` bug#49616: " Efraim Flashner
  0 siblings, 1 reply; 2+ messages in thread
From: Sarah Morgensen via Guix-patches via @ 2021-07-18  4:05 UTC (permalink / raw)
  To: 49616

* 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





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#49616: [PATCH] gnu: go-1.16: Honor #:parallel-build?
  2021-07-18  4:05 [bug#49616] [PATCH] gnu: go-1.16: Honor #:parallel-build? Sarah Morgensen via Guix-patches via
@ 2021-08-05 14:03 ` Efraim Flashner
  0 siblings, 0 replies; 2+ messages in thread
From: Efraim Flashner @ 2021-08-05 14:03 UTC (permalink / raw)
  To: Sarah Morgensen; +Cc: 49616-done

[-- Attachment #1: Type: text/plain, Size: 286 bytes --]

Cut the build phase down from 83 seconds to 41 for me.

Patch pushed!

-- 
Efraim Flashner   <efraim@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-05 14:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-18  4:05 [bug#49616] [PATCH] gnu: go-1.16: Honor #:parallel-build? Sarah Morgensen via Guix-patches via
2021-08-05 14:03 ` bug#49616: " Efraim Flashner

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.