[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
46/75: build-system/go: Honor #:parallel-build?.
From: |
guix-commits |
Subject: |
46/75: build-system/go: Honor #:parallel-build?. |
Date: |
Sun, 21 Jan 2024 13:21:48 -0500 (EST) |
apteryx pushed a commit to branch core-updates
in repository guix.
commit 16bfc5fb21db8ea47b17ff3248114c34f4c8e3ab
Author: Sarah Morgensen <iskarian@mgsn.dev>
AuthorDate: Fri Aug 6 21:48:33 2021 -0700
build-system/go: Honor #:parallel-build?.
guix/build/go-build-system.scm (build): Honor #:parallel-build?.
guix/build-system/go.scm (go-build): Add PARALLEL-BUILD? parameter.
[builder]: Use it.
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
---
guix/build-system/go.scm | 2 ++
guix/build/go-build-system.scm | 6 +++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/guix/build-system/go.scm b/guix/build-system/go.scm
index 3883fac786..0acaeca1cc 100644
--- a/guix/build-system/go.scm
+++ b/guix/build-system/go.scm
@@ -184,6 +184,7 @@ commit hash and its date rather than a proper release tag."
(unpack-path "")
(build-flags ''())
(tests? #t)
+ (parallel-build? #t)
(allow-go-reference? #f)
(system (%current-system))
(goarch #f)
@@ -214,6 +215,7 @@ commit hash and its date rather than a proper release tag."
#:unpack-path #$unpack-path
#:build-flags #$build-flags
#:tests? #$tests?
+ #:parallel-build? #$parallel-build?
#:allow-go-reference? #$allow-go-reference?
#:inputs #$(input-tuples->gexp inputs)))))
diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm
index d32235bf5a..a55381b0c6 100644
--- a/guix/build/go-build-system.scm
+++ b/guix/build/go-build-system.scm
@@ -255,8 +255,12 @@ unpacking."
(_ #f))
inputs))))
-(define* (build #:key import-path build-flags #:allow-other-keys)
+(define* (build #:key import-path build-flags (parallel-build? #t)
+ #:allow-other-keys)
"Build the package named by IMPORT-PATH."
+ (let* ((njobs (if parallel-build? (parallel-job-count) 1)))
+ (setenv "GOMAXPROCS" (number->string njobs)))
+
(with-throw-handler
#t
(lambda _
- 45/75: gnu: dbm: Regenerate Autotools files., (continued)
- 45/75: gnu: dbm: Regenerate Autotools files., guix-commits, 2024/01/21
- 58/75: gnu: python: Make the build reproducible., guix-commits, 2024/01/21
- 65/75: gnu: patchelf: Update to 0.18.0., guix-commits, 2024/01/21
- 66/75: gnu: qpdf: Update to 11.8.0., guix-commits, 2024/01/21
- 51/75: gnu: findutils-boot0: Re-enable most tests., guix-commits, 2024/01/21
- 17/75: gnu: font-canada1500: Install license file., guix-commits, 2024/01/21
- 36/75: gnu: libxcomposite: Update to 0.4.6., guix-commits, 2024/01/21
- 38/75: gnu: transset: Update to 1.0.3., guix-commits, 2024/01/21
- 42/75: gnu: bluez: enable wiimote plugin., guix-commits, 2024/01/21
- 44/75: gnu: man-pages-posix: Remove redundant manpage compression., guix-commits, 2024/01/21
- 46/75: build-system/go: Honor #:parallel-build?.,
guix-commits <=
- 48/75: import: crate: Emit new-style package inputs., guix-commits, 2024/01/21
- 54/75: gnu: bluez: Update to 5.72., guix-commits, 2024/01/21
- 57/75: packages: Fix repacked file name extension when zstd is unavailable., guix-commits, 2024/01/21
- 63/75: gnu: libgpg-error: Update to 1.47., guix-commits, 2024/01/21
- 64/75: gnu: libice: Update to 1.1.1., guix-commits, 2024/01/21
- 68/75: gnu: openjdk9: Make build reproducible., guix-commits, 2024/01/21
- 69/75: gnu: openjdk10: Make more reproducible., guix-commits, 2024/01/21
- 70/75: gnu: openjdk11: Make more reproducible., guix-commits, 2024/01/21
- 75/75: packages: Silence tar's support for --sort check output., guix-commits, 2024/01/21
- 39/75: gnu: xprop: Update to 1.2.6., guix-commits, 2024/01/21