-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev: add support for
dev generate cgo
The contents of these files here is basically cargo-culted from the `Makefile`. I have verified that I can get a build working via the following steps: ./dev generate go cgo ./dev go -- build ./pkg/cmd/cockroach-short We don't exactly mirror the previous contents of the `zcgo_flags.go` files that `make` would create. One difference is that we don't populate the `zcgo_flags` files in `go-libedit` to configure how the C sources are built and linked, so we get the default behavior, which is fine, but means the `go build`-built binary and the Bazel-built binary will be using a different compiled archive (maybe compiled with different flags/ a different configuration/etc.) for the `libedit` sources. With `make`, we address this by putting a `zcgo_flags_extra.go` file in the sources for `go-libedit` right in `vendor`. Post-Bazel we have no reason for `vendor` and have no plans to keep it in the long-term so this is not really suitable. I'm punting on this for now -- the default behavior will probably be "good enough" for most people. Closes #77170. Release note: None
- Loading branch information
1 parent
f69b88f
commit 0ea8283
Showing
3 changed files
with
77 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters