diff options
author | Nikola Pavlica | 2022-05-14 21:35:35 +0200 |
---|---|---|
committer | Nikola Pavlica | 2022-05-14 21:35:35 +0200 |
commit | 49558d38fdd79200501382703d074ef18eb064f4 (patch) | |
tree | 1ab31f8c397919ba292a2d508f8d663dcc068247 | |
parent | 6068b340409ea18c00f46a0748c803e0d936c0fb (diff) | |
download | aur-49558d38fdd79200501382703d074ef18eb064f4.tar.gz |
[fix] add goflags as per @micwoj92's comment
-rw-r--r-- | .SRCINFO | 1 | ||||
-rwxr-xr-x | PKGBUILD | 16 |
2 files changed, 15 insertions, 2 deletions
@@ -13,4 +13,3 @@ pkgbase = discordlogin-git sha1sums = SKIP pkgname = discordlogin-git - @@ -22,7 +22,21 @@ build() { GOPATH="${srcdir}/go" fi cd $_pkgname - go build -trimpath + + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" + + # or alternatively you can define some of these flags from the CLI options + go build \ + -trimpath \ + -buildmode=pie \ + -mod=readonly \ + -modcacherw \ + -ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" \ + . } package() { |