Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump go 1.19: fix error when building tools such as benchmark
The pipeline error: ``` Building 'tools/benchmark'... % 'rm' '-f' 'bin/tools/benchmark' % 'env' 'GO_BUILD_FLAGS=-v' 'CGO_ENABLED=0' 'go' 'build' '-v' '-installsuffix=cgo' '-ldflags='\''-X=go.etcd.io/etcd/api/v3/version.GitSHA=01250c9'\''' '-o=bin/tools/benchmark' './tools/benchmark' stderr: invalid value "'-X=go.etcd.io/etcd/api/v3/version.GitSHA=01250c9'" for flag -ldflags: parameter may not start with quote character ' stderr: usage: go build [-o output] [build flags] [packages] stderr: Run 'go help build' for details. FAIL: (code:2): % 'env' 'GO_BUILD_FLAGS=-v' 'CGO_ENABLED=0' 'go' 'build' '-v' '-installsuffix=cgo' '-ldflags='\''-X=go.etcd.io/etcd/api/v3/version.GitSHA=01250c9'\''' '-o=bin/tools/benchmark' './tools/benchmark' FAIL: 'build' failed at Thu Sep 15 03:13:24 UTC 2022 ``` It's caused by golang/go#43177. Previously invalid -ldflags is silently ignored by go cmd. But it isn't ignored anymore in go 1.19 due to the fix in PR https://go-review.googlesource.com/c/go/+/339289. Signed-off-by: Benjamin Wang <[email protected]>
- Loading branch information