How to specify "binary=True" in go_repo like in go_module #3327
Answered
by
chrisnovakovic
linuxerwang
asked this question in
Q&A
-
go_module supports a "binary=True" which builds an executable, but go_repo doesn't have this parameter, what's the correct way to do it?
Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
chrisnovakovic
Jan 13, 2025
Replies: 1 comment
-
Assuming protobuf is defined in
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
linuxerwang
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Assuming protobuf is defined in
third_party/go/BUILD
as follows:go_repo
defines a subrepo, so the binary is already a distinct target in the build graph - the target's name is based on the structure of the Go module, so protoc-gen-go would be///third_party/go/google.golang.org_protobuf//cmd/protoc-gen-go
.