1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-27 22:36:12 -04:00

removes all file system paths from the compiled executable, to improve build reproducibility

This commit is contained in:
Kslr 2020-10-06 13:17:30 +08:00
parent 48fde93020
commit 03fb762169
No known key found for this signature in database
GPG Key ID: 0AF5F66FA1E887CE

View File

@ -19,6 +19,7 @@ def _go_command(ctx):
"-asmflags", '"all=-trimpath=${GOPATH}/src"',
"-ldflags", "'%s'" % ld_flags,
"-tags", "'%s'" % ctx.attr.gotags,
"-trimpath",
pkg,
]
@ -28,7 +29,6 @@ def _go_command(ctx):
"CGO_ENABLED=0",
"GOOS="+ctx.attr.os,
"GOARCH="+ctx.attr.arch,
#"GOROOT_FINAL=/go",
"GO111MODULE=on",
"GOCACHE=${TMPDIR}/gocache"
]