]> Cypherpunks repositories - gostls13.git/commit
cmd/go: add -trimpath build flag
authorRuss Cox <rsc@golang.org>
Tue, 23 Apr 2019 03:55:27 +0000 (23:55 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 24 Apr 2019 14:25:09 +0000 (14:25 +0000)
commit74695644e0c38586a85b9b483830c546efbb6642
tree1798977e86114cda7a1fb50cdf85885f9ad686ce
parent8a20fde697c973962d978c1284fddf81a694141a
cmd/go: add -trimpath build flag

"go build -trimpath" trims the recorded file paths in the
resulting packages and executables to avoid recording
the names of any local directories. Instead, the files appear
to be stored in directories named either "go/src/..." (for the
standard library) or named after the module or package
in which the files appear.

Fixes #16860.

Change-Id: I433afeeb1fdeea641286b21693fee5e0a66d607e
Reviewed-on: https://go-review.googlesource.com/c/go/+/173345
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/alldocs.go
src/cmd/go/internal/cfg/cfg.go
src/cmd/go/internal/work/build.go
src/cmd/go/internal/work/exec.go
src/cmd/go/internal/work/gc.go
src/cmd/go/script_test.go
src/cmd/go/testdata/script/README
src/cmd/go/testdata/script/build_trimpath.txt [new file with mode: 0644]