Commit Graph

1 Commits

Author SHA1 Message Date
Chris K 03e76b3d2a
grpc: add ability to compile with or without tracing (#6954)
golang.org/x/net/trace is the only dependency of gRPC Go that depends --
through html/template and text/template -- on reflect's MethodByName.
Binaries with MethodByName are not eligible for Go dead code
elimination.

As of protobuf v1.32.0 combined with Go 1.22, Go protobufs support
compilation with dead code elimination. This commit allows users of gRPC
Go to also make use of dead code elimination for smaller binary sizes.

Signed-off-by: Chris Koch <chrisko@google.com>
2024-02-02 13:49:23 -08:00