From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: [PR PATCH] build-style/go: use XBPS_MAKEJOBS to control parallelism
Date: Wed, 19 Jun 2019 04:37:52 +0200 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-12538@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 352 bytes --]
There is a new pull request by CameronNemo against master on the void-packages repository
https://github.com/CameronNemo/void-packages gojobs
https://github.com/void-linux/void-packages/pull/12538
build-style/go: use XBPS_MAKEJOBS to control parallelism
None
A patch file from https://github.com/void-linux/void-packages/pull/12538.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gojobs-12538.patch --]
[-- Type: application/text/x-diff, Size: 2112 bytes --]
From 01acf3798c41c632c733f9972ed245b0ff000a6a Mon Sep 17 00:00:00 2001
From: Cameron Nemo <cnemo@tutanota.com>
Date: Tue, 18 Jun 2019 19:37:27 -0700
Subject: [PATCH] build-style/go: use XBPS_MAKEJOBS to control parallelism
---
Manual.md | 7 ++++++-
common/build-style/go.sh | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/Manual.md b/Manual.md
index ec5206bba58..7f6f23de59e 100644
--- a/Manual.md
+++ b/Manual.md
@@ -1460,7 +1460,7 @@ Go packages should be built with the `go` build style, if possible.
The `go` build style takes care of downloading Go dependencies and
setting up cross compilation.
-The following variables influence how Go packages are built:
+The following template variables influence how Go packages are built:
- `go_import_path`: The import path of the package included in the
distfile, as it would be used with `go get`. For example, GitHub's
@@ -1479,6 +1479,11 @@ The following variables influence how Go packages are built:
accepted by `go build -mod MODE`. Defaults to `vendor` if there's
a vendor directory, otherwise `default`.
+The following environment variables influence how Go packages are built:
+
+- `XBPS_MAKEJOBS`: Value passed to the `-p` flag of `go install`, to
+ control the parallelism of the Go compiler.
+
Occasionally it is necessary to perform operations from within the Go
source tree. This is usually needed by programs using go-bindata or
otherwise preping some assets. If possible do this in pre_build().
diff --git a/common/build-style/go.sh b/common/build-style/go.sh
index 98f95bea2e5..5242a446a15 100644
--- a/common/build-style/go.sh
+++ b/common/build-style/go.sh
@@ -33,7 +33,7 @@ do_build() {
# default behavior.
go_mod_mode=
fi
- go install -mod="${go_mod_mode}" -x -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
+ go install -p "$XBPS_MAKEJOBS" -mod="${go_mod_mode}" -x -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
else
# Otherwise, build using GOPATH
go get -x -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
next reply other threads:[~2019-06-19 2:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-19 2:37 voidlinux-github [this message]
2019-06-19 3:14 ` voidlinux-github
2019-06-19 3:16 ` voidlinux-github
2019-06-25 20:04 ` [PR PATCH] [Merged]: " voidlinux-github
2019-06-25 20:05 ` voidlinux-github
2019-06-25 20:24 ` voidlinux-github
2019-06-25 21:07 ` voidlinux-github
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-12538@inbox.vuxu.org \
--to=voidlinux-github@inbox.vuxu.org \
--cc=ml@inbox.vuxu.org \
/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.
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 NNTP newsgroup(s).