]> Cypherpunks repositories - gostls13.git/commit
cmd/go: add LDFLAGS to cache ID when using cgo
authorIan Lance Taylor <iant@golang.org>
Fri, 6 Jul 2018 20:59:06 +0000 (13:59 -0700)
committerIan Lance Taylor <iant@golang.org>
Mon, 9 Jul 2018 23:39:59 +0000 (23:39 +0000)
commit5fbfda6a833f3bbc3d714459b5194f7fef1e0b43
tree97f15888228799d633ba0191f9ddfc05b13671db
parent2acae8741688ec29fff74118ffa0d0347ae8fc4d
cmd/go: add LDFLAGS to cache ID when using cgo

The cgo tool records the value of the CGO_LDFLAGS environment variable
in the generated file, so that the linker can later read and use it.
Therefore, we must add CGO_LDFLAGS to the cache ID, as otherwise
changing CGO_LDFLAGS may cause a build result to be incorrectly read
from the cache, producing a different final program.

Change-Id: Ic89c1edc4069837451a36376710ca9b56fb87455
Reviewed-on: https://go-review.googlesource.com/122520
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/go/go_test.go
src/cmd/go/internal/work/exec.go