mirror of https://github.com/v2ray/v2ray-core
removes all file system paths from the compiled executable, to improve build reproducibility
parent
48fde93020
commit
03fb762169
|
@ -19,6 +19,7 @@ def _go_command(ctx):
|
||||||
"-asmflags", '"all=-trimpath=${GOPATH}/src"',
|
"-asmflags", '"all=-trimpath=${GOPATH}/src"',
|
||||||
"-ldflags", "'%s'" % ld_flags,
|
"-ldflags", "'%s'" % ld_flags,
|
||||||
"-tags", "'%s'" % ctx.attr.gotags,
|
"-tags", "'%s'" % ctx.attr.gotags,
|
||||||
|
"-trimpath",
|
||||||
pkg,
|
pkg,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -28,7 +29,6 @@ def _go_command(ctx):
|
||||||
"CGO_ENABLED=0",
|
"CGO_ENABLED=0",
|
||||||
"GOOS="+ctx.attr.os,
|
"GOOS="+ctx.attr.os,
|
||||||
"GOARCH="+ctx.attr.arch,
|
"GOARCH="+ctx.attr.arch,
|
||||||
#"GOROOT_FINAL=/go",
|
|
||||||
"GO111MODULE=on",
|
"GO111MODULE=on",
|
||||||
"GOCACHE=${TMPDIR}/gocache"
|
"GOCACHE=${TMPDIR}/gocache"
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue