mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-01 21:23:51 -09:00
https://github.com/grpc/grpc/releases/tag/v1.80.0 Rebased patch 0002 due to upstream commit:4c3996f0dawhich added a new configure option. Added this new configure option -DgRPC_BUILD_GRPCPP_OTEL_PLUGIN=OFF to HOST_GRPC_CONF_OPTS. Updated license hash due to upstream commit:fb53717dfaSigned-off-by: Bernd Kuhls <bernd@kuhls.net> Signed-off-by: Julien Olivain <ju.o@free.fr>
216 lines
5.6 KiB
Diff
216 lines
5.6 KiB
Diff
From fd7f0877e1e4f2305946a5579353d252012ea9e8 Mon Sep 17 00:00:00 2001
|
|
From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
|
|
Date: Tue, 25 May 2021 14:55:23 +0200
|
|
Subject: [PATCH] Add option to restrict building of (host-)grpc to
|
|
grpc_cpp_plugin only.
|
|
|
|
This avoids unnecessary dependencies on big packages like libabseil-cpp and
|
|
others.
|
|
|
|
Upstream: not accepted (see https://github.com/grpc/grpc/issues/25322)
|
|
|
|
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
|
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
|
|
Updated for 1.76.0:
|
|
[build utf8_range_lib as it is now explicitly required]
|
|
Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
|
|
[Bernd: rebased for 1.80.0]
|
|
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
|
---
|
|
CMakeLists.txt | 39 +++++++++++++++++++++++++++++++++------
|
|
1 file changed, 33 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index bc86c00463..08441ddbd2 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -50,12 +50,16 @@ set(gRPC_BUILD_MSVC_MP_COUNT 0 CACHE STRING "The maximum number of processes for
|
|
option(gRPC_BUILD_TESTS "Build tests" OFF)
|
|
option(gRPC_BUILD_CODEGEN "Build codegen" ON)
|
|
option(gRPC_DOWNLOAD_ARCHIVES "Download archives for empty 3rd party directories" ON)
|
|
+option(gRPC_BUILD_PLUGIN_SUPPORT_ONLY "Build plugin support only" OFF)
|
|
|
|
set(gRPC_INSTALL_default ON)
|
|
if(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
|
# Disable gRPC_INSTALL by default if building as a submodule
|
|
set(gRPC_INSTALL_default OFF)
|
|
endif()
|
|
+if(gRPC_BUILD_PLUGIN_SUPPORT_ONLY)
|
|
+ set(gRPC_INSTALL_default OFF)
|
|
+endif()
|
|
set(gRPC_INSTALL ${gRPC_INSTALL_default} CACHE BOOL
|
|
"Generate installation target")
|
|
|
|
@@ -689,6 +693,8 @@ add_custom_target(plugins
|
|
DEPENDS ${_gRPC_PLUGIN_LIST}
|
|
)
|
|
|
|
+if (NOT gRPC_BUILD_PLUGIN_SUPPORT_ONLY)
|
|
+
|
|
add_custom_target(tools_c
|
|
DEPENDS
|
|
)
|
|
@@ -700,6 +706,8 @@ add_custom_target(tools_cxx
|
|
add_custom_target(tools
|
|
DEPENDS tools_c tools_cxx)
|
|
|
|
+endif() # gRPC_BUILD_PLUGIN_SUPPORT_ONLY
|
|
+
|
|
protobuf_generate_grpc_cpp_with_import_path_correction(
|
|
src/core/ext/transport/chaotic_good/chaotic_good_frame.proto src/core/ext/transport/chaotic_good/chaotic_good_frame.proto
|
|
)
|
|
@@ -1986,7 +1994,7 @@ if(gRPC_BUILD_TESTS)
|
|
DEPENDS buildtests_c buildtests_cxx)
|
|
endif()
|
|
|
|
-
|
|
+if (NOT gRPC_BUILD_PLUGIN_SUPPORT_ONLY)
|
|
|
|
add_library(address_sorting
|
|
third_party/address_sorting/address_sorting.c
|
|
@@ -3221,6 +3229,8 @@ if(gRPC_INSTALL)
|
|
)
|
|
endif()
|
|
|
|
+endif() # gRPC_BUILD_PLUGIN_SUPPORT_ONLY
|
|
+
|
|
if(gRPC_BUILD_TESTS)
|
|
|
|
add_library(grpc_test_util
|
|
@@ -3371,6 +3381,8 @@ endif()
|
|
|
|
endif()
|
|
|
|
+if(NOT gRPC_BUILD_PLUGIN_SUPPORT_ONLY)
|
|
+
|
|
add_library(grpc_unsecure
|
|
src/core/call/call_arena_allocator.cc
|
|
src/core/call/call_filters.cc
|
|
@@ -3951,6 +3963,8 @@ if(gRPC_INSTALL)
|
|
)
|
|
endif()
|
|
|
|
+endif() # gRPC_BUILD_PLUGIN_SUPPORT_ONLY
|
|
+
|
|
if(gRPC_BUILD_TESTS)
|
|
|
|
add_library(gtest
|
|
@@ -4025,6 +4039,8 @@ target_link_libraries(gtest
|
|
|
|
endif()
|
|
|
|
+if(NOT gRPC_BUILD_PLUGIN_SUPPORT_ONLY)
|
|
+
|
|
add_library(upb_base_lib
|
|
third_party/upb/upb/base/status.c
|
|
)
|
|
@@ -4641,6 +4657,7 @@ if(gRPC_INSTALL)
|
|
)
|
|
endif()
|
|
|
|
+endif() # gRPC_BUILD_PLUGIN_SUPPORT_ONLY
|
|
|
|
add_library(utf8_range_lib
|
|
third_party/utf8_range/utf8_range.c
|
|
@@ -4681,7 +4698,7 @@ target_link_libraries(utf8_range_lib
|
|
${_gRPC_ALLTARGETS_LIBRARIES}
|
|
)
|
|
|
|
-
|
|
+if (NOT gRPC_BUILD_PLUGIN_SUPPORT_ONLY)
|
|
|
|
if(gRPC_INSTALL)
|
|
install(TARGETS utf8_range_lib EXPORT gRPCTargets
|
|
@@ -4692,6 +4709,8 @@ if(gRPC_INSTALL)
|
|
)
|
|
endif()
|
|
|
|
+endif() # gRPC_BUILD_PLUGIN_SUPPORT_ONLY
|
|
+
|
|
if(gRPC_BUILD_TESTS)
|
|
|
|
if(gRPC_BUILD_CODEGEN)
|
|
@@ -4784,6 +4803,8 @@ endif()
|
|
|
|
endif()
|
|
|
|
+if(NOT gRPC_BUILD_PLUGIN_SUPPORT_ONLY)
|
|
+
|
|
add_library(grpc++
|
|
src/cpp/client/call_credentials.cc
|
|
src/cpp/client/channel_cc.cc
|
|
@@ -5263,6 +5284,7 @@ if(gRPC_INSTALL)
|
|
)
|
|
endif()
|
|
|
|
+endif() # gRPC_BUILD_PLUGIN_SUPPORT_ONLY
|
|
|
|
if(gRPC_BUILD_CODEGEN)
|
|
add_library(grpc++_reflection ${_gRPC_STATIC_WIN32}
|
|
@@ -5537,6 +5559,8 @@ target_link_libraries(grpc++_test_util
|
|
|
|
endif()
|
|
|
|
+if(NOT gRPC_BUILD_PLUGIN_SUPPORT_ONLY)
|
|
+
|
|
add_library(grpc++_unsecure
|
|
src/cpp/client/call_credentials.cc
|
|
src/cpp/client/channel_cc.cc
|
|
@@ -6285,6 +6309,7 @@ if(gRPC_INSTALL)
|
|
)
|
|
endif()
|
|
|
|
+endif() # gRPC_BUILD_PLUGIN_SUPPORT_ONLY
|
|
|
|
add_library(grpc_plugin_support
|
|
src/compiler/cpp_generator.cc
|
|
@@ -6385,7 +6410,7 @@ foreach(_hdr
|
|
endforeach()
|
|
|
|
|
|
-if(gRPC_INSTALL)
|
|
+if(gRPC_INSTALL OR gRPC_BUILD_PLUGIN_SUPPORT_ONLY)
|
|
install(TARGETS grpc_plugin_support EXPORT gRPCTargets
|
|
RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
|
|
BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR}
|
|
@@ -18827,7 +18852,7 @@ target_link_libraries(grpc_completion_queue_test
|
|
|
|
|
|
endif()
|
|
-if(gRPC_BUILD_CODEGEN AND gRPC_BUILD_GRPC_CPP_PLUGIN)
|
|
+if(gRPC_BUILD_GRPC_CPP_PLUGIN)
|
|
|
|
add_executable(grpc_cpp_plugin
|
|
src/compiler/cpp_plugin.cc
|
|
@@ -18855,7 +18880,7 @@ target_link_libraries(grpc_cpp_plugin
|
|
|
|
|
|
|
|
-if(gRPC_INSTALL)
|
|
+if(gRPC_INSTALL OR gRPC_BUILD_PLUGIN_SUPPORT_ONLY)
|
|
install(TARGETS grpc_cpp_plugin EXPORT gRPCPluginTargets
|
|
RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
|
|
BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR}
|
|
@@ -51904,7 +51929,7 @@ endif()
|
|
|
|
|
|
|
|
-
|
|
+if (NOT gRPC_BUILD_PLUGIN_SUPPORT_ONLY)
|
|
|
|
if(gRPC_INSTALL)
|
|
install(EXPORT gRPCTargets
|
|
@@ -54105,6 +54105,8 @@
|
|
"-laddress_sorting -lupb_textformat_lib -lupb_reflection_lib -lupb_wire_lib -lupb_message_lib -lutf8_range_lib -lupb_mini_descriptor_lib -lupb_mini_table_lib -lupb_hash_lib -lupb_mem_lib -lupb_base_lib -lupb_lex_lib"
|
|
"grpc++_unsecure.pc")
|
|
|
|
+endif() # gRPC_BUILD_PLUGIN_SUPPORT_ONLY
|
|
+
|
|
if(gRPC_BUILD_GRPCPP_OTEL_PLUGIN)
|
|
# grpcpp_otel_plugin .pc file
|
|
generate_pkgconfig(
|
|
--
|
|
2.43.0
|
|
|