summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorSven Greb2020-11-13 09:17:56 +0100
committerSven Greb2020-11-13 09:17:56 +0100
commitaf57e047e4cc7f6708efdfdf24a072ba341161b8 (patch)
treee43adbc020e059c95ebeb9b1dbbf3e2666ad0268 /PKGBUILD
parent774ae4272ef1415ebf40f2fcf1128a0964717648 (diff)
downloadaur-af57e047e4cc7f6708efdfdf24a072ba341161b8.tar.gz
Replace "trimpath" GC+ASM flags with new "go build" flag "-trimpath"
The new "-trimpath" flag for the "go build" command was introduced in Go version 1.13.0 [1] and drastically simplifies the way to remove all file system paths from the compiled executable in order to improve build reproducibility. [1]: https://golang.org/doc/go1.13#trimpath
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD3
1 files changed, 1 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 6d4bd6f49eda..d5803cdb1157 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -35,8 +35,7 @@ build() {
fi
go build \
- -gcflags "all=-trimpath=$PWD" \
- -asmflags "all=-trimpath=$PWD" \
+ -trimpath \
-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\" \