-
Notifications
You must be signed in to change notification settings - Fork 17.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/go: teach the build cache about -trimpath
Fixes #31896 Change-Id: I228a809568cd37c599987f9f1e99df5c229e6c9b Reviewed-on: https://go-review.googlesource.com/c/go/+/176112 Run-TryBot: Caleb Spare <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]>
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
env GO111MODULE=on | ||
|
||
# Set up fresh GOCACHE. | ||
env GOCACHE=$WORK/gocache | ||
mkdir $GOCACHE | ||
|
||
cd $WORK | ||
go build -o a.out | ||
|
||
# Varying -trimpath should cause a rebuild. | ||
go build -x -o a.out -trimpath | ||
stderr '(compile|gccgo)( |\.exe)' | ||
stderr 'link( |\.exe)' | ||
|
||
-- $WORK/hello.go -- | ||
package main | ||
func main() { println("hello") } | ||
|
||
-- $WORK/go.mod -- | ||
module m |