Skip to content

Commit

Permalink
sweet/harnesses: bypass Go build version check in github.com/cockroac…
Browse files Browse the repository at this point in the history
…hdb/swiss

Without this, CockroachDB can't build at tip.

Change-Id: Icb7e969e1f7cfb98f15f1f2991213ab67bcb0124
Reviewed-on: https://go-review.googlesource.com/c/benchmarks/+/600196
Reviewed-by: Michael Knyszek <[email protected]>
Auto-Submit: Austin Clements <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
  • Loading branch information
aclements authored and gopherbot committed Jul 22, 2024
1 parent 302fed1 commit de01f14
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sweet/harnesses/cockroachdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,12 @@ func (h CockroachDB) Build(cfg *common.Config, bcfg *common.BuildConfig) error {
// to build cockroach. However, benchmark release branches are on older
// versions that don't recognize the flag. Try first with the flag and
// again without if there is an error.
if buildWithFlagErr := cfg.GoTool().BuildPath(filepath.Join(bcfg.SrcDir, "pkg/cmd/cockroach-short"), bcfg.BinDir, "-ldflags=-checklinkname=0"); buildWithFlagErr != nil {
if buildWithoutFlagErr := cfg.GoTool().BuildPath(filepath.Join(bcfg.SrcDir, "pkg/cmd/cockroach-short"), bcfg.BinDir); buildWithoutFlagErr != nil {
//
// Cockroachdb reaches into runtime internals, so it has a negative build
// tag to exclude unreleased Go versions. Set untested_go_version so we can
// run at tip (and cross our fingers).
if buildWithFlagErr := cfg.GoTool().BuildPath(filepath.Join(bcfg.SrcDir, "pkg/cmd/cockroach-short"), bcfg.BinDir, "-tags=untested_go_version", "-ldflags=-checklinkname=0"); buildWithFlagErr != nil {
if buildWithoutFlagErr := cfg.GoTool().BuildPath(filepath.Join(bcfg.SrcDir, "pkg/cmd/cockroach-short"), bcfg.BinDir, "-tags=untested_go_version"); buildWithoutFlagErr != nil {
return errors.Join(buildWithFlagErr, buildWithoutFlagErr)
}
}
Expand Down

0 comments on commit de01f14

Please sign in to comment.