summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Greb2020-11-13 09:36:23 +0100
committerSven Greb2020-11-13 09:36:23 +0100
commit8d75054d10c0e5938d5b6d4b83a8997c3103cdce (patch)
tree7016d7583a11da9a8fb56fcc57a7922106fa17fb
parent7fd8d8d3ae793c16003365bbbbae35fd2f3388ce (diff)
downloadaur-8d75054d10c0e5938d5b6d4b83a8997c3103cdce.tar.gz
Build executable without CGO
CGO is explicitly disabled in the upstream "GoReleaser" configuration: https://github.com/magefile/mage/blob/5bc3a8ab/.goreleaser.yml#L29
-rw-r--r--PKGBUILD2
1 files changed, 2 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 2947a696ed84..ca039f08894d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -28,6 +28,7 @@ build() {
# See:
# - https://github.com/magefile/mage/blob/5bc3a8ab/magefile.go#L55
# - https://github.com/magefile/mage/blob/5bc3a8ab/magefile.go#L95
+ # - https://github.com/magefile/mage/blob/5bc3a8ab/.goreleaser.yml#L29
local build_date git_commit_hash git_tag
build_date=$(command date --rfc-3339=seconds)
git_commit_hash=$(git rev-parse --short HEAD)
@@ -36,6 +37,7 @@ build() {
git_tag="dev"
fi
+ export CGO_ENABLED=0
go build \
-trimpath \
-buildmode=pie \