diff --git a/build/ci.go b/build/ci.go index d6ae2de60..f69c0eb72 100644 --- a/build/ci.go +++ b/build/ci.go @@ -261,6 +261,10 @@ func doInstall(cmdline []string) { // buildFlags returns the go tool flags for building. func buildFlags(env build.Environment, staticLinking bool, buildTags []string) (flags []string) { var ld []string + // See https://github.com/golang/go/issues/33772#issuecomment-528176001 + // We need to set --buildid to the linker here, and also pass --build-id to the + // cgo-linker further down. + ld = append(ld, "--buildid=none") if env.Commit != "" { ld = append(ld, "-X", "main.gitCommit="+env.Commit) ld = append(ld, "-X", "main.gitDate="+env.Date)