summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorSven Greb2020-11-13 09:19:18 +0100
committerSven Greb2020-11-13 09:19:18 +0100
commit088fd674cb16dad52f281ff4af3d6c584840e04e (patch)
tree62b6aab95ecc800c40c5d935d7a101500b837924 /PKGBUILD
parentaf57e047e4cc7f6708efdfdf24a072ba341161b8 (diff)
downloadaur-088fd674cb16dad52f281ff4af3d6c584840e04e.tar.gz
Build in PIE mode
Build the executable in "Position-independent" build mode [1]. See the Go "-buildmode" flag documentation for more details: https://golang.org/cmd/go/#hdr-Build_modes [1]: https://en.wikipedia.org/wiki/Position-independent_code
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD1
1 files changed, 1 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index d5803cdb1157..55ab0356b610 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -36,6 +36,7 @@ build() {
go build \
-trimpath \
+ -buildmode=pie \
-ldflags "-X \"github.com/magefile/mage/mage.timestamp=$build_date\" \
-X \"github.com/magefile/mage/mage.commitHash=$git_commit_hash\" \
-X \"github.com/magefile/mage/mage.gitTag=$git_tag\" \