Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
59085: Makefile: avoid using `$(GOFLAGS)` in non-test build commands r=otan a=knz Fixes cockroachdb#59084. When running builds inside TC, the TC runner sometimes passes `-parallel` via `$(GOFLAGS)` (e.g. during nightly builds). Since `-parallel` is only usable in `go test`, build commands break because they see a flag they don't support. The reason why CI scripts work, even though `$(GOFLAGS)` is mentioned in the rules that produce the `cockroach` executable, is that the CI is so configured that the `cockroach` executable *specifically* is produced via the `builder` image and cross-compilation. The `Makefile` detects when it is run via cross-compilation and erases the contents of `$(GOFLAGS)` in that case. This patch fixes the issue by avoiding uses of `$(GOFLAGS)` for the `go run` invocations that generated code and docs. Release note: None Co-authored-by: Raphael 'kena' Poss <[email protected]>
- Loading branch information