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

  • Done
  • quality assurance status badge
Details
2 participants
  • Efraim Flashner
  • Sarah Morgensen
Owner
unassigned
Submitted by
Sarah Morgensen
Severity
normal
S
S
Sarah Morgensen wrote on 18 Jul 2021 06:05
(address . guix-patches@gnu.org)
e6be2c6352c0f403bfe49b4e5a5aee8df973ce16.1626580876.git.iskarian@mgsn.dev
* 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(-)

Toggle diff (31 lines)
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
E
E
Efraim Flashner wrote on 5 Aug 2021 16:03
(name . Sarah Morgensen)(address . iskarian@mgsn.dev)(address . 49616-done@debbugs.gnu.org)
YQvvyYB6cimUoSfA@3900XT
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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmEL78gACgkQQarn3Mo9
g1Fs4g//eAWJLgp4cPyeDrCtjGf99K+g7UTEp+jqgtoV8s5sCpV2Xg4+Eaaz48sg
rqQTuXD8JuwGXMaYr5pDSBNfuwGxsl2OSTgNnhsDtbUbeA2+AT/NanqviHFYNv5G
bGTLivVZCAimybdtVdZldavXyhS+aKg40xju9fBc+XnrqEu06i68JowKWghJ1Qo2
IM+vISxdVN5B2SGm+O1HSK1WagEYdW9d+Ho4xDrbRmAgwD6mzuiQt0cACZdMwvmu
nzW/MBhwrhleogUmFizqqk05BOs0RCHVJR45/yVJJx5n+J/mAV0qIikx4yfK6dc+
Y6wbJZpZsbymOPEqUIeICB8xBKiv+cVhjMpv9trqIzRQCz05qq1Shc/YXCBFTmzO
5YQQQdU2HGYS9BMa/+yD8MaH+BLMQFi6rzlmsVHDfnSP73t2kAWWYjG3f910eFb4
3IzYAyoePb5vTO6K+1+WowUp+UjPJ06ooNHSgfl4FgccY1UdXaUINQP/r7uX//hA
TD6STl2Ejem3D3+GaUrYnBAN5ShmDQX/5ZqMUjgq+9yJOsyPPCA9XzwzmgRe0qqV
lcq7urM14iUD2gb9TM/AcoyNtu6H9G+/UZNBwK4oaspa7/g5ylJrjh6l48ZlLyYe
Dla/KgEqTv8RxTiw7N9ohCHG2XNYUemVZEvIfChffdw/0ocwURg=
=tEKj
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 49616@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 49616
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch