cmd/go: build tags dependency exclusion not working #59656
Labels
FrozenDueToAge
GoCommand
cmd/go
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
Description
When building my Go binary, I tried using build tags (a, b) to decrease the size of my binary. But the binary size stayed the same, even though i wasn't using the library in the build 'a'.
So I wanted to make a proposal for optimizing builds to not include the dependencies that are not in use; similar to how test dependencies can be excluding from binaries when that are in a different module.
Use Case
I have a binary which will have a bunch of features/integrations (~10 different options for now). And some clients might not need all, if any. So that could decrease the binary size by 50MB. This may be more or less depending on the libraries.
The text was updated successfully, but these errors were encountered: