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>
Showing
Please register or sign in to comment