Disable unnecessary gRPC features to reduce binary size.

Incidentally, this also removes RE2 code from the binary.

(cherry picked from commit 30b9b73546)
This commit is contained in:
Pavel Pautov 2024-03-11 22:36:34 -07:00 committed by Sergey A. Osokin
parent cbf01a63a8
commit e6fa9531c8

View file

@ -47,6 +47,9 @@ if(NGX_OTEL_FETCH_DEPS)
FetchContent_MakeAvailable(grpc otelcpp) FetchContent_MakeAvailable(grpc otelcpp)
# reconsider once https://github.com/grpc/grpc/issues/36023 is done
target_compile_definitions(grpc PRIVATE GRPC_NO_XDS GRPC_NO_RLS)
set_property(DIRECTORY ${grpc_SOURCE_DIR} set_property(DIRECTORY ${grpc_SOURCE_DIR}
PROPERTY EXCLUDE_FROM_ALL YES) PROPERTY EXCLUDE_FROM_ALL YES)
set_property(DIRECTORY ${otelcpp_SOURCE_DIR} set_property(DIRECTORY ${otelcpp_SOURCE_DIR}