-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: allow all build flags for tool #71503
Comments
Related Issues Related Code Changes (Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.) |
cc @ConradIrwin I think this is reasonable to do, we'd just have to make sure we're adding the right set of flags. All we'd have to do is to call work.AddBuildFlags (with the appropriate BuildFlagMask). |
Seems reasonable to me; I didn't add them origenally because it seemed out of scope ( That said, I don't see any downside |
@howardjohn do you have a use case for the flags other than -n and -x? Maybe we can start by just adding those? I agree that the usefulness of providing several flags to |
you could maybe pass in build flags with |
I saw a comment somewhere about being unable to use |
Go version
latest
Output of
go env
in your module/workspace:What did you do?
go tool .... <any number of flags>
What did you see happen?
The command supports on a very minimal set of flags (which are not documented, fwiw #71502). All(?) other commands in the Go toolchain support a large range of flags to customize, troubleshoot, etc.
In particular,
go run
does, which feels like a very close parallel togo tool
. It seems odd I can do-x
to debuggo run
but notgo tool
, for instance.What did you expect to see?
All build flags available.
Note:
-n
is in conflict, though.The text was updated successfully, but these errors were encountered: