diff --git a/3rd-party/submodule_info.md b/3rd-party/submodule_info.md index 4e1aa30c29..2126e048cc 100644 --- a/3rd-party/submodule_info.md +++ b/3rd-party/submodule_info.md @@ -7,7 +7,7 @@ info on where to find release information about the submodule. **This file needs updating when a submodule is updated!** ### gRPC -Version: 1.52.1 (+[our patches](https://github.com/CanonicalLtd/grpc/compare/v1.52.1..ba8e7f72)) | +Version: 1.60.0 (+[our patches](https://github.com/canonical/grpc/compare/v1.60.0...canonical:grpc:multipass_on_grpc_1.60.0)) | | @@ -50,3 +50,8 @@ Version: 1.9.4 | Version: 1.13.3 | | + +### vcpkg +Version: 2024.09.30 | + | + diff --git a/3rd-party/vcpkg b/3rd-party/vcpkg index ca7b1b15f5..c82f746672 160000 --- a/3rd-party/vcpkg +++ b/3rd-party/vcpkg @@ -1 +1 @@ -Subproject commit ca7b1b15f548c25c766360593a2c732d56ed0133 +Subproject commit c82f74667287d3dc386bce81e44964370c91a289 diff --git a/3rd-party/vcpkg-ports/grpc/00001-fix-uwp.patch b/3rd-party/vcpkg-ports/grpc/00001-fix-uwp.patch new file mode 100644 index 0000000000..e33079b34c --- /dev/null +++ b/3rd-party/vcpkg-ports/grpc/00001-fix-uwp.patch @@ -0,0 +1,73 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ec370e9..4f7d770 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -237,6 +237,9 @@ if(UNIX) + endif() + if(WIN32) + set(_gRPC_PLATFORM_WINDOWS ON) ++ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") ++ set(_gRPC_PLATFORM_UWP ON) ++ endif() + endif() + + if (APPLE AND NOT DEFINED CMAKE_CXX_STANDARD) +@@ -267,6 +270,9 @@ if(MSVC) + set(_gRPC_C_CXX_FLAGS "${_gRPC_C_CXX_FLAGS} /wd4267") + # TODO(jtattermusch): needed to build boringssl with VS2017, revisit later + set(_gRPC_C_CXX_FLAGS "${_gRPC_C_CXX_FLAGS} /wd4987 /wd4774 /wd4819 /wd4996 /wd4619") ++ if(_gRPC_PLATFORM_UWP) ++ add_definitions(-DGRPC_ARES=0) ++ endif() + # Silences thousands of trucation warnings + set(_gRPC_C_CXX_FLAGS "${_gRPC_C_CXX_FLAGS} /wd4503") + # Tell MSVC to build grpc using utf-8 +@@ -439,6 +445,10 @@ file(MAKE_DIRECTORY ${_gRPC_PROTO_GENS_DIR}) + # ``.proto`` files + # + function(protobuf_generate_grpc_cpp) ++ if(_gRPC_PLATFORM_UWP) ++ return() ++ endif() ++ + if(NOT ARGN) + message(SEND_ERROR "Error: PROTOBUF_GENERATE_GRPC_CPP() called without any proto files") + return() +@@ -561,6 +571,7 @@ if (gRPC_BUILD_GRPC_RUBY_PLUGIN) + list(APPEND _gRPC_PLUGIN_LIST grpc_ruby_plugin) + endif () + ++if(NOT _gRPC_PLATFORM_UWP) + add_custom_target(plugins + DEPENDS ${_gRPC_PLUGIN_LIST} + ) +@@ -575,6 +586,7 @@ add_custom_target(tools_cxx + + add_custom_target(tools + DEPENDS tools_c tools_cxx) ++endif() + + protobuf_generate_grpc_cpp_with_import_path_correction( + src/proto/grpc/channelz/channelz.proto src/proto/grpc/channelz/channelz.proto +diff --git a/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc b/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc +index b034cca..5dbdfe3 100644 +--- a/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc ++++ b/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc +@@ -40,6 +40,7 @@ bool check_bios_data(const char*) { return false; } + bool check_windows_registry_product_name(HKEY root_key, + const char* reg_key_path, + const char* reg_key_name) { ++ #if !defined(WINAPI_FAMILY) || WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP + const size_t kProductNameBufferSize = 256; + char const expected_substr[] = "Google"; + +@@ -72,6 +73,9 @@ bool check_windows_registry_product_name(HKEY root_key, + } + + return strstr(buffer, expected_substr) != nullptr; ++#else ++ return false; ++#endif + } + + } // namespace internal diff --git a/3rd-party/vcpkg-ports/grpc/00004-link-gdi32-on-windows.patch b/3rd-party/vcpkg-ports/grpc/00004-link-gdi32-on-windows.patch index 54b55c60b8..a3af55facc 100644 --- a/3rd-party/vcpkg-ports/grpc/00004-link-gdi32-on-windows.patch +++ b/3rd-party/vcpkg-ports/grpc/00004-link-gdi32-on-windows.patch @@ -1,13 +1,13 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 25990a5d8a..8a632d2289 100644 +index fce68b9..220f251 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -404,7 +404,7 @@ if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/xds) +@@ -432,7 +432,7 @@ if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/xds) endif() if(WIN32) -- set(_gRPC_BASELIB_LIBRARIES ws2_32 crypt32) -+ set(_gRPC_BASELIB_LIBRARIES wsock32 ws2_32 crypt32 gdi32) +- set(_gRPC_ALLTARGETS_LIBRARIES ${_gRPC_ALLTARGETS_LIBRARIES} ws2_32 crypt32) ++ set(_gRPC_ALLTARGETS_LIBRARIES ${_gRPC_ALLTARGETS_LIBRARIES} wsock32 ws2_32 crypt32 gdi32) + set(_gRPC_STATIC_WIN32 STATIC) endif() - # Create directory for proto source files diff --git a/3rd-party/vcpkg-ports/grpc/00005-fix-uwp-error.patch b/3rd-party/vcpkg-ports/grpc/00005-fix-uwp-error.patch index 23f885d48e..69a3e7d646 100644 --- a/3rd-party/vcpkg-ports/grpc/00005-fix-uwp-error.patch +++ b/3rd-party/vcpkg-ports/grpc/00005-fix-uwp-error.patch @@ -1,10 +1,10 @@ diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.cc b/src/core/ext/transport/chttp2/transport/hpack_parser.cc -index b0d3a6465b..5c48f1aa30 100644 +index 31bf464..d1007e4 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.cc +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.cc -@@ -1037,7 +1037,7 @@ class HPackParser::Parser { +@@ -689,7 +689,7 @@ class HPackParser::Parser { + } - private: void GPR_ATTRIBUTE_NOINLINE LogHeader(const HPackTable::Memento& memento) { - const char* type; + const char* type = nullptr; @@ -12,7 +12,7 @@ index b0d3a6465b..5c48f1aa30 100644 case LogInfo::kHeaders: type = "HDR"; diff --git a/src/core/lib/slice/slice.cc b/src/core/lib/slice/slice.cc -index 898a62823c..6b31cdc082 100644 +index 6180ef1..a8e8110 100644 --- a/src/core/lib/slice/slice.cc +++ b/src/core/lib/slice/slice.cc @@ -188,6 +188,7 @@ grpc_slice grpc_slice_from_moved_buffer(grpc_core::UniquePtr p, @@ -33,10 +33,10 @@ index 898a62823c..6b31cdc082 100644 slice.refcount = nullptr; slice.data.inlined.length = str.size(); diff --git a/src/core/lib/surface/server.cc b/src/core/lib/surface/server.cc -index 141b16e345..89d9d6dafd 100644 +index 3dda49d..202caa5 100644 --- a/src/core/lib/surface/server.cc +++ b/src/core/lib/surface/server.cc -@@ -902,7 +902,7 @@ grpc_call_error Server::QueueRequestedCall(size_t cq_idx, RequestedCall* rc) { +@@ -1057,7 +1057,7 @@ grpc_call_error Server::QueueRequestedCall(size_t cq_idx, RequestedCall* rc) { FailCall(cq_idx, rc, GRPC_ERROR_CREATE("Server Shutdown")); return GRPC_CALL_OK; } diff --git a/3rd-party/vcpkg-ports/grpc/00009-use-system-upb.patch b/3rd-party/vcpkg-ports/grpc/00009-use-system-upb.patch new file mode 100644 index 0000000000..8419504571 --- /dev/null +++ b/3rd-party/vcpkg-ports/grpc/00009-use-system-upb.patch @@ -0,0 +1,143 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a3b39a1..8d7c1f6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3213,17 +3213,6 @@ add_library(grpc_unsecure + src/core/tsi/local_transport_security.cc + src/core/tsi/transport_security.cc + src/core/tsi/transport_security_grpc.cc +- third_party/upb/upb/message/accessors.c +- third_party/upb/upb/mini_descriptor/build_enum.c +- third_party/upb/upb/mini_descriptor/decode.c +- third_party/upb/upb/mini_descriptor/internal/base92.c +- third_party/upb/upb/mini_descriptor/internal/encode.c +- third_party/upb/upb/mini_descriptor/link.c +- third_party/upb/upb/wire/decode.c +- third_party/upb/upb/wire/decode_fast.c +- third_party/upb/upb/wire/encode.c +- third_party/upb/upb/wire/eps_copy_input_stream.c +- third_party/upb/upb/wire/reader.c + ${gRPC_ADDITIONAL_DLL_SRC} + ) + +@@ -3456,6 +3445,7 @@ target_link_libraries(gtest + endif() + + ++if(0) # vcpkg upb + add_library(upb ${_gRPC_STATIC_WIN32} + third_party/upb/upb/base/status.c + third_party/upb/upb/mem/alloc.c +@@ -3818,6 +3808,7 @@ if(gRPC_INSTALL) + ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} + ) + endif() ++endif() # vcpkg upb + + if(gRPC_BUILD_TESTS) + +@@ -5190,25 +5181,6 @@ add_library(grpc_authorization_provider + src/core/tsi/alts/handshaker/transport_security_common_api.cc + src/core/tsi/transport_security.cc + src/core/tsi/transport_security_grpc.cc +- third_party/upb/upb/hash/common.c +- third_party/upb/upb/message/accessors.c +- third_party/upb/upb/message/array.c +- third_party/upb/upb/message/map.c +- third_party/upb/upb/message/map_sorter.c +- third_party/upb/upb/message/message.c +- third_party/upb/upb/mini_descriptor/build_enum.c +- third_party/upb/upb/mini_descriptor/decode.c +- third_party/upb/upb/mini_descriptor/internal/base92.c +- third_party/upb/upb/mini_descriptor/internal/encode.c +- third_party/upb/upb/mini_descriptor/link.c +- third_party/upb/upb/mini_table/extension_registry.c +- third_party/upb/upb/mini_table/internal/message.c +- third_party/upb/upb/mini_table/message.c +- third_party/upb/upb/wire/decode.c +- third_party/upb/upb/wire/decode_fast.c +- third_party/upb/upb/wire/encode.c +- third_party/upb/upb/wire/eps_copy_input_stream.c +- third_party/upb/upb/wire/reader.c + ) + + target_compile_features(grpc_authorization_provider PUBLIC cxx_std_14) +@@ -30412,9 +30384,9 @@ generate_pkgconfig( + "high performance general RPC framework" + "${gRPC_CORE_VERSION}" + "absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_cleanup absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_memory absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr" +- "libcares openssl re2 zlib" ++ "libcares openssl re2 zlib utf8_range" + "-lgrpc" +- "-laddress_sorting -lupb -lupb_textformat_lib -lupb_json_lib -lutf8_range_lib -lupb_collections_lib" ++ "-laddress_sorting -lupb" + "grpc.pc") + + # grpc_unsecure .pc file +@@ -30423,9 +30395,9 @@ generate_pkgconfig( + "high performance general RPC framework without SSL" + "${gRPC_CORE_VERSION}" + "absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_cleanup absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_memory absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr" +- "libcares zlib" ++ "libcares zlib utf8_range" + "-lgrpc_unsecure" +- "-laddress_sorting -lutf8_range_lib -lupb -lupb_collections_lib" ++ "-laddress_sorting -lupb" + "grpc_unsecure.pc") + + # grpc++ .pc file +@@ -30434,9 +30406,9 @@ generate_pkgconfig( + "C++ wrapper for gRPC" + "${gRPC_CPP_VERSION}" + "absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_cleanup absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_memory absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr grpc" +- "libcares openssl re2 zlib" ++ "libcares openssl re2 zlib utf8_range" + "-lgrpc++" +- "-laddress_sorting -lupb -lupb_textformat_lib -lupb_json_lib -lutf8_range_lib -lupb_collections_lib" ++ "-laddress_sorting -lupb" + "grpc++.pc") + + # grpc++_unsecure .pc file +@@ -30445,7 +30417,7 @@ generate_pkgconfig( + "C++ wrapper for gRPC without SSL" + "${gRPC_CPP_VERSION}" + "absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_cleanup absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_memory absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr grpc_unsecure" +- "libcares zlib" ++ "libcares zlib utf8_range" + "-lgrpc++_unsecure" +- "-laddress_sorting -lutf8_range_lib -lupb -lupb_collections_lib" ++ "-laddress_sorting -lupb" + "grpc++_unsecure.pc") +diff --git a/cmake/gRPCConfig.cmake.in b/cmake/gRPCConfig.cmake.in +index 98d8c6d..7cad2ab 100644 +--- a/cmake/gRPCConfig.cmake.in ++++ b/cmake/gRPCConfig.cmake.in +@@ -8,6 +8,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/modules) + @_gRPC_FIND_CARES@ + @_gRPC_FIND_ABSL@ + @_gRPC_FIND_RE2@ ++@_gRPC_FIND_UPB@ + + # Targets + include(${CMAKE_CURRENT_LIST_DIR}/gRPCTargets.cmake) +diff --git a/cmake/upb.cmake b/cmake/upb.cmake +index 9156e5f..31324fa 100644 +--- a/cmake/upb.cmake ++++ b/cmake/upb.cmake +@@ -14,7 +14,15 @@ + + set(UPB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/upb) + +-set(_gRPC_UPB_INCLUDE_DIR "${UPB_ROOT_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/third_party/utf8_range") ++set(_gRPC_UPB_INCLUDE_DIR "") + set(_gRPC_UPB_GRPC_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-gen" "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upbdefs-gen") + + set(_gRPC_UPB_LIBRARIES upb) ++ ++find_package(upb CONFIG REQUIRED) ++set(_gRPC_FIND_UPB "find_dependency(upb CONFIG)") ++add_library(upb_collections_lib ALIAS upb::upb) ++add_library(upb_json_lib ALIAS upb::upb) ++add_library(upb_textformat_lib ALIAS upb::upb) ++add_library(upb ALIAS upb::upb) ++add_library(utf8_range_lib ALIAS utf8_range::utf8_range) diff --git a/3rd-party/vcpkg-ports/grpc/00014-pkgconfig-upbdefs.patch b/3rd-party/vcpkg-ports/grpc/00014-pkgconfig-upbdefs.patch deleted file mode 100644 index 1c2bda5b1b..0000000000 --- a/3rd-party/vcpkg-ports/grpc/00014-pkgconfig-upbdefs.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 48019cce95..1eda700ae8 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -23186,7 +23186,7 @@ generate_pkgconfig( - "high performance general RPC framework" - "${gRPC_CORE_VERSION}" - "gpr openssl absl_any_invocable absl_base absl_bind_front absl_cleanup absl_cord absl_core_headers absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_memory absl_optional absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant" -- "-lgrpc -laddress_sorting -lre2 -lupb -lcares -lz" -+ "-lgrpc -laddress_sorting -lre2 -lupb_textformat -lupb_mini_table -lupb -lupb_collections -lupb_reflection -lupb_extension_registry -lupb_json -lupb_fastdecode -lupb_utf8_range -ldescriptor_upb_proto -lcares -lz" - "" - "grpc.pc") - diff --git a/3rd-party/vcpkg-ports/grpc/00015-disable-download-archive.patch b/3rd-party/vcpkg-ports/grpc/00015-disable-download-archive.patch index b28bc72a7c..675c2519dc 100644 --- a/3rd-party/vcpkg-ports/grpc/00015-disable-download-archive.patch +++ b/3rd-party/vcpkg-ports/grpc/00015-disable-download-archive.patch @@ -1,5 +1,5 @@ diff --git a/cmake/download_archive.cmake b/cmake/download_archive.cmake -index 820aafafb7..a59b785c7e 100644 +index 820aafa..a59b785 100644 --- a/cmake/download_archive.cmake +++ b/cmake/download_archive.cmake @@ -19,6 +19,7 @@ file(MAKE_DIRECTORY ${_download_archive_TEMPORARY_DIR}) diff --git a/3rd-party/vcpkg-ports/grpc/00016-fix-plugin-targets.patch b/3rd-party/vcpkg-ports/grpc/00016-fix-plugin-targets.patch new file mode 100644 index 0000000000..ce7924ceb1 --- /dev/null +++ b/3rd-party/vcpkg-ports/grpc/00016-fix-plugin-targets.patch @@ -0,0 +1,12 @@ +diff --git a/cmake/gRPCConfig.cmake.in b/cmake/gRPCConfig.cmake.in +index 7cad2abca1..c287f3b413 100644 +--- a/cmake/gRPCConfig.cmake.in ++++ b/cmake/gRPCConfig.cmake.in +@@ -12,6 +12,6 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/modules) + + # Targets + include(${CMAKE_CURRENT_LIST_DIR}/gRPCTargets.cmake) +-if(NOT CMAKE_CROSSCOMPILING) ++if(@gRPC_BUILD_CODEGEN@) + include(${CMAKE_CURRENT_LIST_DIR}/gRPCPluginTargets.cmake) + endif() diff --git a/3rd-party/vcpkg-ports/grpc/00017-abseil.patch b/3rd-party/vcpkg-ports/grpc/00017-abseil.patch new file mode 100644 index 0000000000..4fd424cd91 --- /dev/null +++ b/3rd-party/vcpkg-ports/grpc/00017-abseil.patch @@ -0,0 +1,36 @@ +diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +index dde7570ede..43e06d7a69 100644 +--- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc ++++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +@@ -32,6 +32,7 @@ + #include "absl/strings/string_view.h" + #include "absl/strings/strip.h" + #include "absl/types/optional.h" ++#include "absl/strings/str_cat.h" + + #include + #include +diff --git a/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc b/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc +index 74f7392af9..656cdc427b 100644 +--- a/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc ++++ b/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc +@@ -21,6 +21,7 @@ + #include "src/core/lib/event_engine/cf_engine/cfstream_endpoint.h" + #include "src/core/lib/event_engine/trace.h" + #include "src/core/lib/gprpp/strerror.h" ++#include "absl/strings/str_cat.h" + + namespace grpc_event_engine { + namespace experimental { +diff --git a/src/core/lib/gprpp/windows/directory_reader.cc b/src/core/lib/gprpp/windows/directory_reader.cc +index 790e213e78..103d68a5a3 100644 +--- a/src/core/lib/gprpp/windows/directory_reader.cc ++++ b/src/core/lib/gprpp/windows/directory_reader.cc +@@ -28,6 +28,7 @@ + + #include "absl/status/statusor.h" + #include "absl/strings/string_view.h" ++#include "absl/strings/str_cat.h" + + #include + diff --git a/3rd-party/vcpkg-ports/grpc/gRPCTargets-vcpkg-tools.cmake b/3rd-party/vcpkg-ports/grpc/gRPCTargets-vcpkg-tools.cmake new file mode 100644 index 0000000000..1ed3509c94 --- /dev/null +++ b/3rd-party/vcpkg-ports/grpc/gRPCTargets-vcpkg-tools.cmake @@ -0,0 +1,10 @@ +file(GLOB GRPC_PLUGINS "${_IMPORT_PREFIX}/../@HOST_TRIPLET@/tools/grpc/grpc_*_plugin*") + +foreach(PLUGIN ${GRPC_PLUGINS}) + get_filename_component(PLUGIN_NAME "${PLUGIN}" NAME_WE) + add_executable(gRPC::${PLUGIN_NAME} IMPORTED) + set_property(TARGET gRPC::${PLUGIN_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(gRPC::${PLUGIN_NAME} PROPERTIES + IMPORTED_LOCATION_RELEASE "${PLUGIN}" + ) +endforeach() diff --git a/3rd-party/vcpkg-ports/grpc/portfile.cmake b/3rd-party/vcpkg-ports/grpc/portfile.cmake index ef1f48b984..feacb11d86 100644 --- a/3rd-party/vcpkg-ports/grpc/portfile.cmake +++ b/3rd-party/vcpkg-ports/grpc/portfile.cmake @@ -5,20 +5,34 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO canonical/grpc - REF e3acf245a91630fe4d464091ba5446f6a638d82f - SHA512 18574197f4a5070de07c39c096ead2175c150a2b790adbb3d9639b0637641015fb91f5cffa916b50863d6ee62203ad2a6964ce87566b6ae7b41716594c445c06 + REF bfcc6af27db9de9dc0a5edb3bc8ab46731956ba1 + SHA512 e84e0ec81981ec33adc191fd06ece6e8ebac02c1a0dc612e689809015a171aab276330be952f7b052ad8b213820c0a29f03b5d2f25c2d236b311d0e420efeff8 HEAD_REF master PATCHES + 00001-fix-uwp.patch 00002-static-linking-in-linux.patch 00003-undef-base64-macro.patch 00004-link-gdi32-on-windows.patch 00005-fix-uwp-error.patch - 00006-remove-unused-libraries.patch - snprintf.patch + 00009-use-system-upb.patch 00015-disable-download-archive.patch + 00016-fix-plugin-targets.patch + 00017-abseil.patch + remove_unneeded_lib_custom.patch ) -if(NOT TARGET_TRIPLET STREQUAL HOST_TRIPLET) +# Ensure de-vendoring +file(REMOVE_RECURSE + "${SOURCE_PATH}/third_party/abseil-cpp" + "${SOURCE_PATH}/third_party/cares" + "${SOURCE_PATH}/third_party/protobuf" + "${SOURCE_PATH}/third_party/re2" + "${SOURCE_PATH}/third_party/upb" + "${SOURCE_PATH}/third_party/utf8_range" + "${SOURCE_PATH}/third_party/zlib" +) + +if(VCPKG_CROSSCOMPILING) vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/grpc") endif() @@ -49,19 +63,18 @@ vcpkg_cmake_configure( -DgRPC_PROTOBUF_PROVIDER=package -DgRPC_ABSL_PROVIDER=package -DgRPC_RE2_PROVIDER=package - -DgRPC_PROTOBUF_PACKAGE_TYPE=CONFIG -DgRPC_CARES_PROVIDER=${cares_CARES_PROVIDER} -DgRPC_BENCHMARK_PROVIDER=none -DgRPC_INSTALL_BINDIR:STRING=bin -DgRPC_INSTALL_LIBDIR:STRING=lib -DgRPC_INSTALL_INCLUDEDIR:STRING=include -DgRPC_INSTALL_CMAKEDIR:STRING=share/grpc - -DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF - -DgRPC_BUILD_GRPC_NODE_PLUGIN=OFF - -DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=OFF - -DgRPC_BUILD_GRPC_PHP_PLUGIN=OFF - -DgRPC_BUILD_GRPC_PYTHON_PLUGIN=OFF - -DgRPC_BUILD_GRPC_RUBY_PLUGIN=OFF + -DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF + -DgRPC_BUILD_GRPC_NODE_PLUGIN=OFF + -DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=OFF + -DgRPC_BUILD_GRPC_PHP_PLUGIN=OFF + -DgRPC_BUILD_GRPC_PYTHON_PLUGIN=OFF + -DgRPC_BUILD_GRPC_RUBY_PLUGIN=OFF "-D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/protobuf/protoc${VCPKG_HOST_EXECUTABLE_SUFFIX}" "-DProtobuf_PROTOC_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/protobuf/protoc${VCPKG_HOST_EXECUTABLE_SUFFIX}" MAYBE_UNUSED_VARIABLES @@ -87,4 +100,4 @@ else() vcpkg_fixup_pkgconfig(SKIP_CHECK) endif() -file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/3rd-party/vcpkg-ports/grpc/00006-remove-unused-libraries.patch b/3rd-party/vcpkg-ports/grpc/remove_unneeded_lib_custom.patch similarity index 54% rename from 3rd-party/vcpkg-ports/grpc/00006-remove-unused-libraries.patch rename to 3rd-party/vcpkg-ports/grpc/remove_unneeded_lib_custom.patch index 42e84657ea..ee00982576 100644 --- a/3rd-party/vcpkg-ports/grpc/00006-remove-unused-libraries.patch +++ b/3rd-party/vcpkg-ports/grpc/remove_unneeded_lib_custom.patch @@ -1,10 +1,15 @@ ---- a/CMakeLists.txt 2023-06-28 15:13:15.285490308 -0400 -+++ b/CMakeLists.txt 2024-02-21 16:10:59.343573098 -0500 -@@ -2684,498 +2706,6 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b2bab7726a..6c39e93e34 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2826,419 +2826,45 @@ endif() endif() ++if(gRPC_BUILD_TESTS) + -add_library(grpc_unsecure +- src/core/ext/filters/backend_metrics/backend_metric_filter.cc - src/core/ext/filters/census/grpc_context.cc - src/core/ext/filters/channel_idle/channel_idle_filter.cc - src/core/ext/filters/channel_idle/idle_filter_state.cc @@ -19,22 +24,24 @@ - src/core/ext/filters/client_channel/config_selector.cc - src/core/ext/filters/client_channel/dynamic_filters.cc - src/core/ext/filters/client_channel/global_subchannel_pool.cc -- src/core/ext/filters/client_channel/health/health_check_client.cc -- src/core/ext/filters/client_channel/http_proxy.cc +- src/core/ext/filters/client_channel/http_proxy_mapper.cc - src/core/ext/filters/client_channel/lb_policy/address_filtering.cc - src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc +- src/core/ext/filters/client_channel/lb_policy/endpoint_list.cc - src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc - src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +- src/core/ext/filters/client_channel/lb_policy/health_check_client.cc - src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.cc - src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc - src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc - src/core/ext/filters/client_channel/lb_policy/priority/priority.cc -- src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc - src/core/ext/filters/client_channel/lb_policy/rls/rls.cc - src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +- src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.cc +- src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc - src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc - src/core/ext/filters/client_channel/local_subchannel_pool.cc - src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc @@ -44,12 +51,15 @@ - src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc - src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc - src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc -- src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc +- src/core/ext/filters/client_channel/resolver/dns/dns_resolver_plugin.cc +- src/core/ext/filters/client_channel/resolver/dns/event_engine/event_engine_client_channel_resolver.cc +- src/core/ext/filters/client_channel/resolver/dns/event_engine/service_config_helper.cc - src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc - src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc - src/core/ext/filters/client_channel/resolver/polling_resolver.cc - src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc - src/core/ext/filters/client_channel/retry_filter.cc +- src/core/ext/filters/client_channel/retry_filter_legacy_call_data.cc - src/core/ext/filters/client_channel/retry_service_config.cc - src/core/ext/filters/client_channel/retry_throttle.cc - src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc @@ -70,7 +80,6 @@ - src/core/ext/transport/chttp2/transport/bin_decoder.cc - src/core/ext/transport/chttp2/transport/bin_encoder.cc - src/core/ext/transport/chttp2/transport/chttp2_transport.cc -- src/core/ext/transport/chttp2/transport/context_list.cc - src/core/ext/transport/chttp2/transport/decode_huff.cc - src/core/ext/transport/chttp2/transport/flow_control.cc - src/core/ext/transport/chttp2/transport/frame_data.cc @@ -81,50 +90,60 @@ - src/core/ext/transport/chttp2/transport/frame_window_update.cc - src/core/ext/transport/chttp2/transport/hpack_encoder.cc - src/core/ext/transport/chttp2/transport/hpack_encoder_table.cc +- src/core/ext/transport/chttp2/transport/hpack_parse_result.cc - src/core/ext/transport/chttp2/transport/hpack_parser.cc - src/core/ext/transport/chttp2/transport/hpack_parser_table.cc - src/core/ext/transport/chttp2/transport/http2_settings.cc - src/core/ext/transport/chttp2/transport/http_trace.cc - src/core/ext/transport/chttp2/transport/huffsyms.cc +- src/core/ext/transport/chttp2/transport/max_concurrent_streams_policy.cc - src/core/ext/transport/chttp2/transport/parsing.cc +- src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc +- src/core/ext/transport/chttp2/transport/ping_callbacks.cc +- src/core/ext/transport/chttp2/transport/ping_rate_policy.cc - src/core/ext/transport/chttp2/transport/stream_lists.cc -- src/core/ext/transport/chttp2/transport/stream_map.cc - src/core/ext/transport/chttp2/transport/varint.cc +- src/core/ext/transport/chttp2/transport/write_size_policy.cc - src/core/ext/transport/chttp2/transport/writing.cc - src/core/ext/transport/inproc/inproc_plugin.cc - src/core/ext/transport/inproc/inproc_transport.cc -- src/core/ext/upb-generated/google/api/annotations.upb.c -- src/core/ext/upb-generated/google/api/http.upb.c -- src/core/ext/upb-generated/google/protobuf/any.upb.c -- src/core/ext/upb-generated/google/protobuf/descriptor.upb.c -- src/core/ext/upb-generated/google/protobuf/duration.upb.c -- src/core/ext/upb-generated/google/protobuf/empty.upb.c -- src/core/ext/upb-generated/google/protobuf/struct.upb.c -- src/core/ext/upb-generated/google/protobuf/timestamp.upb.c -- src/core/ext/upb-generated/google/protobuf/wrappers.upb.c -- src/core/ext/upb-generated/google/rpc/status.upb.c -- src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c -- src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c -- src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c -- src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c -- src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c -- src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.c -- src/core/ext/upb-generated/validate/validate.upb.c -- src/core/ext/upb-generated/xds/data/orca/v3/orca_load_report.upb.c -- src/core/ext/upb-generated/xds/service/orca/v3/orca.upb.c +- src/core/ext/transport/inproc/legacy_inproc_transport.cc +- src/core/ext/upb-gen/google/api/annotations.upb_minitable.c +- src/core/ext/upb-gen/google/api/http.upb_minitable.c +- src/core/ext/upb-gen/google/protobuf/any.upb_minitable.c +- src/core/ext/upb-gen/google/protobuf/descriptor.upb_minitable.c +- src/core/ext/upb-gen/google/protobuf/duration.upb_minitable.c +- src/core/ext/upb-gen/google/protobuf/empty.upb_minitable.c +- src/core/ext/upb-gen/google/protobuf/struct.upb_minitable.c +- src/core/ext/upb-gen/google/protobuf/timestamp.upb_minitable.c +- src/core/ext/upb-gen/google/protobuf/wrappers.upb_minitable.c +- src/core/ext/upb-gen/google/rpc/status.upb_minitable.c +- src/core/ext/upb-gen/src/proto/grpc/gcp/altscontext.upb_minitable.c +- src/core/ext/upb-gen/src/proto/grpc/gcp/handshaker.upb_minitable.c +- src/core/ext/upb-gen/src/proto/grpc/gcp/transport_security_common.upb_minitable.c +- src/core/ext/upb-gen/src/proto/grpc/health/v1/health.upb_minitable.c +- src/core/ext/upb-gen/src/proto/grpc/lb/v1/load_balancer.upb_minitable.c +- src/core/ext/upb-gen/src/proto/grpc/lookup/v1/rls.upb_minitable.c +- src/core/ext/upb-gen/validate/validate.upb_minitable.c +- src/core/ext/upb-gen/xds/data/orca/v3/orca_load_report.upb_minitable.c +- src/core/ext/upb-gen/xds/service/orca/v3/orca.upb_minitable.c - src/core/lib/address_utils/parse_address.cc - src/core/lib/address_utils/sockaddr_utils.cc - src/core/lib/backoff/backoff.cc +- src/core/lib/backoff/random_early_detection.cc +- src/core/lib/channel/call_tracer.cc - src/core/lib/channel/channel_args.cc - src/core/lib/channel/channel_args_preconditioning.cc - src/core/lib/channel/channel_stack.cc - src/core/lib/channel/channel_stack_builder.cc - src/core/lib/channel/channel_stack_builder_impl.cc +- src/core/lib/channel/channel_stack_trace.cc - src/core/lib/channel/channel_trace.cc - src/core/lib/channel/channelz.cc - src/core/lib/channel/channelz_registry.cc - src/core/lib/channel/connected_channel.cc - src/core/lib/channel/promise_based_filter.cc +- src/core/lib/channel/server_call_tracer_filter.cc - src/core/lib/channel/status_util.cc - src/core/lib/compression/compression.cc - src/core/lib/compression/compression_internal.cc @@ -135,9 +154,14 @@ - src/core/lib/debug/stats.cc - src/core/lib/debug/stats_data.cc - src/core/lib/debug/trace.cc +- src/core/lib/event_engine/ares_resolver.cc +- src/core/lib/event_engine/cf_engine/cf_engine.cc +- src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc +- src/core/lib/event_engine/cf_engine/dns_service_resolver.cc - src/core/lib/event_engine/channel_args_endpoint_config.cc - src/core/lib/event_engine/default_event_engine.cc - src/core/lib/event_engine/default_event_engine_factory.cc +- src/core/lib/event_engine/event_engine.cc - src/core/lib/event_engine/forkable.cc - src/core/lib/event_engine/memory_allocator.cc - src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc @@ -158,19 +182,29 @@ - src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc - src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc - src/core/lib/event_engine/resolved_address.cc +- src/core/lib/event_engine/shim.cc - src/core/lib/event_engine/slice.cc - src/core/lib/event_engine/slice_buffer.cc - src/core/lib/event_engine/tcp_socket_utils.cc -- src/core/lib/event_engine/thread_pool.cc +- src/core/lib/event_engine/thread_pool/thread_count.cc +- src/core/lib/event_engine/thread_pool/thread_pool_factory.cc +- src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc +- src/core/lib/event_engine/thready_event_engine/thready_event_engine.cc - src/core/lib/event_engine/time_util.cc - src/core/lib/event_engine/trace.cc - src/core/lib/event_engine/utils.cc +- src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc - src/core/lib/event_engine/windows/iocp.cc - src/core/lib/event_engine/windows/win_socket.cc +- src/core/lib/event_engine/windows/windows_endpoint.cc - src/core/lib/event_engine/windows/windows_engine.cc +- src/core/lib/event_engine/windows/windows_listener.cc +- src/core/lib/event_engine/work_queue/basic_work_queue.cc - src/core/lib/experiments/config.cc - src/core/lib/experiments/experiments.cc - src/core/lib/gprpp/load_file.cc +- src/core/lib/gprpp/per_cpu.cc +- src/core/lib/gprpp/ref_counted_string.cc - src/core/lib/gprpp/status_helper.cc - src/core/lib/gprpp/time.cc - src/core/lib/gprpp/time_averaged_stats.cc @@ -183,6 +217,7 @@ - src/core/lib/iomgr/buffer_list.cc - src/core/lib/iomgr/call_combiner.cc - src/core/lib/iomgr/cfstream_handle.cc +- src/core/lib/iomgr/closure.cc - src/core/lib/iomgr/combiner.cc - src/core/lib/iomgr/dualstack_socket_posix.cc - src/core/lib/iomgr/endpoint.cc @@ -196,6 +231,9 @@ - src/core/lib/iomgr/ev_poll_posix.cc - src/core/lib/iomgr/ev_posix.cc - src/core/lib/iomgr/ev_windows.cc +- src/core/lib/iomgr/event_engine_shims/closure.cc +- src/core/lib/iomgr/event_engine_shims/endpoint.cc +- src/core/lib/iomgr/event_engine_shims/tcp_client.cc - src/core/lib/iomgr/exec_ctx.cc - src/core/lib/iomgr/executor.cc - src/core/lib/iomgr/fork_posix.cc @@ -249,6 +287,7 @@ - src/core/lib/iomgr/timer_manager.cc - src/core/lib/iomgr/unix_sockets_posix.cc - src/core/lib/iomgr/unix_sockets_posix_noop.cc +- src/core/lib/iomgr/vsock.cc - src/core/lib/iomgr/wakeup_fd_eventfd.cc - src/core/lib/iomgr/wakeup_fd_nospecial.cc - src/core/lib/iomgr/wakeup_fd_pipe.cc @@ -259,11 +298,12 @@ - src/core/lib/load_balancing/lb_policy.cc - src/core/lib/load_balancing/lb_policy_registry.cc - src/core/lib/promise/activity.cc -- src/core/lib/promise/pipe.cc +- src/core/lib/promise/party.cc - src/core/lib/promise/sleep.cc +- src/core/lib/promise/trace.cc +- src/core/lib/resolver/endpoint_addresses.cc - src/core/lib/resolver/resolver.cc - src/core/lib/resolver/resolver_registry.cc -- src/core/lib/resolver/server_address.cc - src/core/lib/resource_quota/api.cc - src/core/lib/resource_quota/arena.cc - src/core/lib/resource_quota/memory_quota.cc @@ -307,6 +347,7 @@ - src/core/lib/slice/percent_encoding.cc - src/core/lib/slice/slice.cc - src/core/lib/slice/slice_buffer.cc +- src/core/lib/slice/slice_refcount.cc - src/core/lib/slice/slice_string_helpers.cc - src/core/lib/surface/api_trace.cc - src/core/lib/surface/builtins.cc @@ -330,6 +371,7 @@ - src/core/lib/surface/server.cc - src/core/lib/surface/validate_metadata.cc - src/core/lib/surface/version.cc +- src/core/lib/transport/batch_builder.cc - src/core/lib/transport/bdp_estimator.cc - src/core/lib/transport/connectivity_state.cc - src/core/lib/transport/error_utils.cc @@ -352,65 +394,108 @@ - src/core/tsi/local_transport_security.cc - src/core/tsi/transport_security.cc - src/core/tsi/transport_security_grpc.cc --) -- +- ${gRPC_ADDITIONAL_DLL_SRC} ++ ++add_library(gtest ++ third_party/googletest/googlemock/src/gmock-cardinalities.cc ++ third_party/googletest/googlemock/src/gmock-internal-utils.cc ++ third_party/googletest/googlemock/src/gmock-matchers.cc ++ third_party/googletest/googlemock/src/gmock-spec-builders.cc ++ third_party/googletest/googlemock/src/gmock.cc ++ third_party/googletest/googletest/src/gtest-assertion-result.cc ++ third_party/googletest/googletest/src/gtest-death-test.cc ++ third_party/googletest/googletest/src/gtest-filepath.cc ++ third_party/googletest/googletest/src/gtest-matchers.cc ++ third_party/googletest/googletest/src/gtest-port.cc ++ third_party/googletest/googletest/src/gtest-printers.cc ++ third_party/googletest/googletest/src/gtest-test-part.cc ++ third_party/googletest/googletest/src/gtest-typed-test.cc ++ third_party/googletest/googletest/src/gtest.cc + ) + +-target_compile_features(grpc_unsecure PUBLIC cxx_std_14) ++target_compile_features(gtest PUBLIC cxx_std_14) + -set_target_properties(grpc_unsecure PROPERTIES -- VERSION ${gRPC_CORE_VERSION} -- SOVERSION ${gRPC_CORE_SOVERSION} --) -- --if(WIN32 AND MSVC) ++set_target_properties(gtest PROPERTIES + VERSION ${gRPC_CORE_VERSION} + SOVERSION ${gRPC_CORE_SOVERSION} + ) + + if(WIN32 AND MSVC) - set_target_properties(grpc_unsecure PROPERTIES COMPILE_PDB_NAME "grpc_unsecure" -- COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" -- ) -- if(gRPC_INSTALL) -- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_unsecure.pdb -- DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL -- ) ++ set_target_properties(gtest PROPERTIES COMPILE_PDB_NAME "gtest" + COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" + ) +- set_target_properties(grpc_unsecure PROPERTIES DEFINE_SYMBOL "GRPC_DLL_EXPORTS") +- if(BUILD_SHARED_LIBS) +- target_compile_definitions(grpc_unsecure INTERFACE GRPC_DLL_IMPORTS) - endif() --endif() -- + if(gRPC_INSTALL) +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_unsecure.pdb ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gtest.pdb + DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL + ) + endif() + endif() + -target_include_directories(grpc_unsecure -- PUBLIC $ $ -- PRIVATE -- ${CMAKE_CURRENT_SOURCE_DIR} -- ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} -- ${_gRPC_RE2_INCLUDE_DIR} -- ${_gRPC_SSL_INCLUDE_DIR} -- ${_gRPC_UPB_GENERATED_DIR} -- ${_gRPC_UPB_GRPC_GENERATED_DIR} -- ${_gRPC_UPB_INCLUDE_DIR} -- ${_gRPC_XXHASH_INCLUDE_DIR} -- ${_gRPC_ZLIB_INCLUDE_DIR} --) ++target_include_directories(gtest + PUBLIC $ $ + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} +@@ -3250,202 +2876,33 @@ target_include_directories(grpc_unsecure + ${_gRPC_UPB_INCLUDE_DIR} + ${_gRPC_XXHASH_INCLUDE_DIR} + ${_gRPC_ZLIB_INCLUDE_DIR} ++ third_party/googletest/googletest/include ++ third_party/googletest/googletest ++ third_party/googletest/googlemock/include ++ third_party/googletest/googlemock + ) -target_link_libraries(grpc_unsecure -- ${_gRPC_BASELIB_LIBRARIES} ++target_link_libraries(gtest + ${_gRPC_ALLTARGETS_LIBRARIES} +- upb_collections_lib +- upb +- utf8_range_lib - ${_gRPC_ZLIB_LIBRARIES} -- ${_gRPC_CARES_LIBRARIES} -- ${_gRPC_ADDRESS_SORTING_LIBRARIES} -- ${_gRPC_RE2_LIBRARIES} -- ${_gRPC_UPB_LIBRARIES} -- ${_gRPC_ALLTARGETS_LIBRARIES} +- absl::algorithm_container - absl::cleanup - absl::flat_hash_map -- absl::flat_hash_set ++ ${_gRPC_RE2_LIBRARIES} + absl::flat_hash_set - absl::inlined_vector -- absl::any_invocable - absl::bind_front - absl::function_ref - absl::hash - absl::type_traits +- absl::random_bit_gen_ref +- absl::random_distributions - absl::statusor - absl::span - absl::utility +- ${_gRPC_CARES_LIBRARIES} - gpr -- address_sorting -- upb --) +- ${_gRPC_ADDRESS_SORTING_LIBRARIES} ++ absl::failure_signal_handler ++ absl::stacktrace ++ absl::symbolize ++ absl::flags ++ absl::flags_parse ++ absl::flags_reflection ++ absl::flags_usage ++ absl::strings ++ absl::any ++ absl::optional ++ absl::variant + ) -if(_gRPC_PLATFORM_IOS OR _gRPC_PLATFORM_MAC) - target_link_libraries(grpc_unsecure "-framework CoreFoundation") --endif() -- ++ ++ + endif() + -foreach(_hdr - include/grpc/byte_buffer.h - include/grpc/byte_buffer_reader.h @@ -427,9 +512,12 @@ - include/grpc/event_engine/slice_buffer.h - include/grpc/fork.h - include/grpc/grpc.h +- include/grpc/grpc_audit_logging.h +- include/grpc/grpc_crl_provider.h - include/grpc/grpc_posix.h - include/grpc/grpc_security.h - include/grpc/grpc_security_constants.h +- include/grpc/impl/channel_arg_names.h - include/grpc/impl/codegen/atm.h - include/grpc/impl/codegen/atm_gcc_atomic.h - include/grpc/impl/codegen/atm_gcc_sync.h @@ -466,6 +554,7 @@ - include/grpc/support/atm_gcc_sync.h - include/grpc/support/atm_windows.h - include/grpc/support/cpu.h +- include/grpc/support/json.h - include/grpc/support/log.h - include/grpc/support/log_windows.h - include/grpc/support/port_platform.h @@ -489,42 +578,589 @@ - - -if(gRPC_INSTALL) -- install(TARGETS grpc_unsecure EXPORT gRPCTargets +- install(TARGETS grpc_unsecure EXPORT gRPCTargets +- RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} +- BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} +- LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} +- ) +-endif() +- +-if(gRPC_BUILD_TESTS) +- +- +-add_library(gtest +- third_party/googletest/googlemock/src/gmock-cardinalities.cc +- third_party/googletest/googlemock/src/gmock-internal-utils.cc +- third_party/googletest/googlemock/src/gmock-matchers.cc +- third_party/googletest/googlemock/src/gmock-spec-builders.cc +- third_party/googletest/googlemock/src/gmock.cc +- third_party/googletest/googletest/src/gtest-assertion-result.cc +- third_party/googletest/googletest/src/gtest-death-test.cc +- third_party/googletest/googletest/src/gtest-filepath.cc +- third_party/googletest/googletest/src/gtest-matchers.cc +- third_party/googletest/googletest/src/gtest-port.cc +- third_party/googletest/googletest/src/gtest-printers.cc +- third_party/googletest/googletest/src/gtest-test-part.cc +- third_party/googletest/googletest/src/gtest-typed-test.cc +- third_party/googletest/googletest/src/gtest.cc +-) +- +-target_compile_features(gtest PUBLIC cxx_std_14) +- +-set_target_properties(gtest PROPERTIES +- VERSION ${gRPC_CORE_VERSION} +- SOVERSION ${gRPC_CORE_SOVERSION} +-) +- +-if(WIN32 AND MSVC) +- set_target_properties(gtest PROPERTIES COMPILE_PDB_NAME "gtest" +- COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" +- ) +- if(gRPC_INSTALL) +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gtest.pdb +- DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL +- ) +- endif() +-endif() +- +-target_include_directories(gtest +- PUBLIC $ $ +- PRIVATE +- ${CMAKE_CURRENT_SOURCE_DIR} +- ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} +- ${_gRPC_RE2_INCLUDE_DIR} +- ${_gRPC_SSL_INCLUDE_DIR} +- ${_gRPC_UPB_GENERATED_DIR} +- ${_gRPC_UPB_GRPC_GENERATED_DIR} +- ${_gRPC_UPB_INCLUDE_DIR} +- ${_gRPC_XXHASH_INCLUDE_DIR} +- ${_gRPC_ZLIB_INCLUDE_DIR} +- third_party/googletest/googletest/include +- third_party/googletest/googletest +- third_party/googletest/googlemock/include +- third_party/googletest/googlemock +-) +-target_link_libraries(gtest +- ${_gRPC_ALLTARGETS_LIBRARIES} +- ${_gRPC_RE2_LIBRARIES} +- absl::flat_hash_set +- absl::failure_signal_handler +- absl::stacktrace +- absl::symbolize +- absl::flags +- absl::flags_parse +- absl::flags_reflection +- absl::flags_usage +- absl::strings +- absl::any +- absl::optional +- absl::variant +-) + +- +-endif() +- +- +-if(0) # vcpkg upb ++if(0) # vcpkg upb + add_library(upb ${_gRPC_STATIC_WIN32} + third_party/upb/upb/base/status.c + third_party/upb/upb/mem/alloc.c +@@ -3808,7 +3265,7 @@ if(gRPC_INSTALL) + ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} + ) + endif() +-endif() # vcpkg upb ++endif() # vcpkg upb + + if(gRPC_BUILD_TESTS) + +@@ -3977,1231 +3434,281 @@ if(WIN32 AND MSVC) + if(gRPC_INSTALL) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++.pdb + DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL +- ) +- endif() +-endif() +- +-target_include_directories(grpc++ +- PUBLIC $ $ +- PRIVATE +- ${CMAKE_CURRENT_SOURCE_DIR} +- ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} +- ${_gRPC_RE2_INCLUDE_DIR} +- ${_gRPC_SSL_INCLUDE_DIR} +- ${_gRPC_UPB_GENERATED_DIR} +- ${_gRPC_UPB_GRPC_GENERATED_DIR} +- ${_gRPC_UPB_INCLUDE_DIR} +- ${_gRPC_XXHASH_INCLUDE_DIR} +- ${_gRPC_ZLIB_INCLUDE_DIR} +- ${_gRPC_PROTO_GENS_DIR} +-) +-target_link_libraries(grpc++ +- ${_gRPC_ALLTARGETS_LIBRARIES} +- grpc +- ${_gRPC_PROTOBUF_LIBRARIES} +-) +- +-foreach(_hdr +- include/grpc++/alarm.h +- include/grpc++/channel.h +- include/grpc++/client_context.h +- include/grpc++/completion_queue.h +- include/grpc++/create_channel.h +- include/grpc++/create_channel_posix.h +- include/grpc++/ext/health_check_service_server_builder_option.h +- include/grpc++/generic/async_generic_service.h +- include/grpc++/generic/generic_stub.h +- include/grpc++/grpc++.h +- include/grpc++/health_check_service_interface.h +- include/grpc++/impl/call.h +- include/grpc++/impl/channel_argument_option.h +- include/grpc++/impl/client_unary_call.h +- include/grpc++/impl/codegen/async_stream.h +- include/grpc++/impl/codegen/async_unary_call.h +- include/grpc++/impl/codegen/byte_buffer.h +- include/grpc++/impl/codegen/call.h +- include/grpc++/impl/codegen/call_hook.h +- include/grpc++/impl/codegen/channel_interface.h +- include/grpc++/impl/codegen/client_context.h +- include/grpc++/impl/codegen/client_unary_call.h +- include/grpc++/impl/codegen/completion_queue.h +- include/grpc++/impl/codegen/completion_queue_tag.h +- include/grpc++/impl/codegen/config.h +- include/grpc++/impl/codegen/config_protobuf.h +- include/grpc++/impl/codegen/create_auth_context.h +- include/grpc++/impl/codegen/metadata_map.h +- include/grpc++/impl/codegen/method_handler_impl.h +- include/grpc++/impl/codegen/proto_utils.h +- include/grpc++/impl/codegen/rpc_method.h +- include/grpc++/impl/codegen/rpc_service_method.h +- include/grpc++/impl/codegen/security/auth_context.h +- include/grpc++/impl/codegen/serialization_traits.h +- include/grpc++/impl/codegen/server_context.h +- include/grpc++/impl/codegen/server_interface.h +- include/grpc++/impl/codegen/service_type.h +- include/grpc++/impl/codegen/slice.h +- include/grpc++/impl/codegen/status.h +- include/grpc++/impl/codegen/status_code_enum.h +- include/grpc++/impl/codegen/string_ref.h +- include/grpc++/impl/codegen/stub_options.h +- include/grpc++/impl/codegen/sync_stream.h +- include/grpc++/impl/codegen/time.h +- include/grpc++/impl/grpc_library.h +- include/grpc++/impl/method_handler_impl.h +- include/grpc++/impl/rpc_method.h +- include/grpc++/impl/rpc_service_method.h +- include/grpc++/impl/serialization_traits.h +- include/grpc++/impl/server_builder_option.h +- include/grpc++/impl/server_builder_plugin.h +- include/grpc++/impl/server_initializer.h +- include/grpc++/impl/service_type.h +- include/grpc++/resource_quota.h +- include/grpc++/security/auth_context.h +- include/grpc++/security/auth_metadata_processor.h +- include/grpc++/security/credentials.h +- include/grpc++/security/server_credentials.h +- include/grpc++/server.h +- include/grpc++/server_builder.h +- include/grpc++/server_context.h +- include/grpc++/server_posix.h +- include/grpc++/support/async_stream.h +- include/grpc++/support/async_unary_call.h +- include/grpc++/support/byte_buffer.h +- include/grpc++/support/channel_arguments.h +- include/grpc++/support/config.h +- include/grpc++/support/slice.h +- include/grpc++/support/status.h +- include/grpc++/support/status_code_enum.h +- include/grpc++/support/string_ref.h +- include/grpc++/support/stub_options.h +- include/grpc++/support/sync_stream.h +- include/grpc++/support/time.h +- include/grpcpp/alarm.h +- include/grpcpp/channel.h +- include/grpcpp/client_context.h +- include/grpcpp/completion_queue.h +- include/grpcpp/create_channel.h +- include/grpcpp/create_channel_binder.h +- include/grpcpp/create_channel_posix.h +- include/grpcpp/ext/call_metric_recorder.h +- include/grpcpp/ext/health_check_service_server_builder_option.h +- include/grpcpp/ext/server_metric_recorder.h +- include/grpcpp/generic/async_generic_service.h +- include/grpcpp/generic/generic_stub.h +- include/grpcpp/grpcpp.h +- include/grpcpp/health_check_service_interface.h +- include/grpcpp/impl/call.h +- include/grpcpp/impl/call_hook.h +- include/grpcpp/impl/call_op_set.h +- include/grpcpp/impl/call_op_set_interface.h +- include/grpcpp/impl/channel_argument_option.h +- include/grpcpp/impl/channel_interface.h +- include/grpcpp/impl/client_unary_call.h +- include/grpcpp/impl/codegen/async_generic_service.h +- include/grpcpp/impl/codegen/async_stream.h +- include/grpcpp/impl/codegen/async_unary_call.h +- include/grpcpp/impl/codegen/byte_buffer.h +- include/grpcpp/impl/codegen/call.h +- include/grpcpp/impl/codegen/call_hook.h +- include/grpcpp/impl/codegen/call_op_set.h +- include/grpcpp/impl/codegen/call_op_set_interface.h +- include/grpcpp/impl/codegen/callback_common.h +- include/grpcpp/impl/codegen/channel_interface.h +- include/grpcpp/impl/codegen/client_callback.h +- include/grpcpp/impl/codegen/client_context.h +- include/grpcpp/impl/codegen/client_interceptor.h +- include/grpcpp/impl/codegen/client_unary_call.h +- include/grpcpp/impl/codegen/completion_queue.h +- include/grpcpp/impl/codegen/completion_queue_tag.h +- include/grpcpp/impl/codegen/config.h +- include/grpcpp/impl/codegen/config_protobuf.h +- include/grpcpp/impl/codegen/create_auth_context.h +- include/grpcpp/impl/codegen/delegating_channel.h +- include/grpcpp/impl/codegen/intercepted_channel.h +- include/grpcpp/impl/codegen/interceptor.h +- include/grpcpp/impl/codegen/interceptor_common.h +- include/grpcpp/impl/codegen/message_allocator.h +- include/grpcpp/impl/codegen/metadata_map.h +- include/grpcpp/impl/codegen/method_handler.h +- include/grpcpp/impl/codegen/method_handler_impl.h +- include/grpcpp/impl/codegen/proto_buffer_reader.h +- include/grpcpp/impl/codegen/proto_buffer_writer.h +- include/grpcpp/impl/codegen/proto_utils.h +- include/grpcpp/impl/codegen/rpc_method.h +- include/grpcpp/impl/codegen/rpc_service_method.h +- include/grpcpp/impl/codegen/security/auth_context.h +- include/grpcpp/impl/codegen/serialization_traits.h +- include/grpcpp/impl/codegen/server_callback.h +- include/grpcpp/impl/codegen/server_callback_handlers.h +- include/grpcpp/impl/codegen/server_context.h +- include/grpcpp/impl/codegen/server_interceptor.h +- include/grpcpp/impl/codegen/server_interface.h +- include/grpcpp/impl/codegen/service_type.h +- include/grpcpp/impl/codegen/slice.h +- include/grpcpp/impl/codegen/status.h +- include/grpcpp/impl/codegen/status_code_enum.h +- include/grpcpp/impl/codegen/string_ref.h +- include/grpcpp/impl/codegen/stub_options.h +- include/grpcpp/impl/codegen/sync.h +- include/grpcpp/impl/codegen/sync_stream.h +- include/grpcpp/impl/codegen/time.h +- include/grpcpp/impl/completion_queue_tag.h +- include/grpcpp/impl/create_auth_context.h +- include/grpcpp/impl/delegating_channel.h +- include/grpcpp/impl/grpc_library.h +- include/grpcpp/impl/intercepted_channel.h +- include/grpcpp/impl/interceptor_common.h +- include/grpcpp/impl/metadata_map.h +- include/grpcpp/impl/method_handler_impl.h +- include/grpcpp/impl/proto_utils.h +- include/grpcpp/impl/rpc_method.h +- include/grpcpp/impl/rpc_service_method.h +- include/grpcpp/impl/serialization_traits.h +- include/grpcpp/impl/server_builder_option.h +- include/grpcpp/impl/server_builder_plugin.h +- include/grpcpp/impl/server_callback_handlers.h +- include/grpcpp/impl/server_initializer.h +- include/grpcpp/impl/service_type.h +- include/grpcpp/impl/status.h +- include/grpcpp/impl/sync.h +- include/grpcpp/resource_quota.h +- include/grpcpp/security/audit_logging.h +- include/grpcpp/security/auth_context.h +- include/grpcpp/security/auth_metadata_processor.h +- include/grpcpp/security/authorization_policy_provider.h +- include/grpcpp/security/binder_credentials.h +- include/grpcpp/security/binder_security_policy.h +- include/grpcpp/security/credentials.h +- include/grpcpp/security/server_credentials.h +- include/grpcpp/security/tls_certificate_provider.h +- include/grpcpp/security/tls_certificate_verifier.h +- include/grpcpp/security/tls_credentials_options.h +- include/grpcpp/security/tls_crl_provider.h +- include/grpcpp/server.h +- include/grpcpp/server_builder.h +- include/grpcpp/server_context.h +- include/grpcpp/server_interface.h +- include/grpcpp/server_posix.h +- include/grpcpp/support/async_stream.h +- include/grpcpp/support/async_unary_call.h +- include/grpcpp/support/byte_buffer.h +- include/grpcpp/support/callback_common.h +- include/grpcpp/support/channel_arguments.h +- include/grpcpp/support/client_callback.h +- include/grpcpp/support/client_interceptor.h +- include/grpcpp/support/config.h +- include/grpcpp/support/interceptor.h +- include/grpcpp/support/message_allocator.h +- include/grpcpp/support/method_handler.h +- include/grpcpp/support/proto_buffer_reader.h +- include/grpcpp/support/proto_buffer_writer.h +- include/grpcpp/support/server_callback.h +- include/grpcpp/support/server_interceptor.h +- include/grpcpp/support/slice.h +- include/grpcpp/support/status.h +- include/grpcpp/support/status_code_enum.h +- include/grpcpp/support/string_ref.h +- include/grpcpp/support/stub_options.h +- include/grpcpp/support/sync_stream.h +- include/grpcpp/support/time.h +- include/grpcpp/support/validate_service_config.h +- include/grpcpp/version_info.h +- include/grpcpp/xds_server_builder.h +-) +- string(REPLACE "include/" "" _path ${_hdr}) +- get_filename_component(_path ${_path} PATH) +- install(FILES ${_hdr} +- DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}" +- ) +-endforeach() +- +- +-if(gRPC_INSTALL) +- install(TARGETS grpc++ EXPORT gRPCTargets +- RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} +- BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} +- LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} +- ) +-endif() +- +- +- +-add_library(grpc++_alts +- src/cpp/common/alts_context.cc +- src/cpp/common/alts_util.cc +- ${gRPC_UPB_GEN_DUPL_SRC} +-) +- +-target_compile_features(grpc++_alts PUBLIC cxx_std_14) +- +-set_target_properties(grpc++_alts PROPERTIES +- VERSION ${gRPC_CPP_VERSION} +- SOVERSION ${gRPC_CPP_SOVERSION} +-) +- +-if(WIN32 AND MSVC) +- set_target_properties(grpc++_alts PROPERTIES COMPILE_PDB_NAME "grpc++_alts" +- COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" +- ) +- if(gRPC_INSTALL) +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_alts.pdb +- DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL +- ) +- endif() +-endif() +- +-target_include_directories(grpc++_alts +- PUBLIC $ $ +- PRIVATE +- ${CMAKE_CURRENT_SOURCE_DIR} +- ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} +- ${_gRPC_RE2_INCLUDE_DIR} +- ${_gRPC_SSL_INCLUDE_DIR} +- ${_gRPC_UPB_GENERATED_DIR} +- ${_gRPC_UPB_GRPC_GENERATED_DIR} +- ${_gRPC_UPB_INCLUDE_DIR} +- ${_gRPC_XXHASH_INCLUDE_DIR} +- ${_gRPC_ZLIB_INCLUDE_DIR} +- ${_gRPC_PROTO_GENS_DIR} +-) +-target_link_libraries(grpc++_alts +- ${_gRPC_ALLTARGETS_LIBRARIES} +- grpc++ +-) +- +-foreach(_hdr +- include/grpcpp/security/alts_context.h +- include/grpcpp/security/alts_util.h +-) +- string(REPLACE "include/" "" _path ${_hdr}) +- get_filename_component(_path ${_path} PATH) +- install(FILES ${_hdr} +- DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}" +- ) +-endforeach() +- +- +-if(gRPC_INSTALL) +- install(TARGETS grpc++_alts EXPORT gRPCTargets +- RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} +- BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} +- LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} +- ) +-endif() +- +- +- +-add_library(grpc++_error_details +- src/cpp/util/error_details.cc +-) +- +-target_compile_features(grpc++_error_details PUBLIC cxx_std_14) +- +-set_target_properties(grpc++_error_details PROPERTIES +- VERSION ${gRPC_CPP_VERSION} +- SOVERSION ${gRPC_CPP_SOVERSION} +-) +- +-if(WIN32 AND MSVC) +- set_target_properties(grpc++_error_details PROPERTIES COMPILE_PDB_NAME "grpc++_error_details" +- COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" +- ) +- if(gRPC_INSTALL) +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_error_details.pdb +- DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL +- ) +- endif() +-endif() +- +-target_include_directories(grpc++_error_details +- PUBLIC $ $ +- PRIVATE +- ${CMAKE_CURRENT_SOURCE_DIR} +- ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} +- ${_gRPC_RE2_INCLUDE_DIR} +- ${_gRPC_SSL_INCLUDE_DIR} +- ${_gRPC_UPB_GENERATED_DIR} +- ${_gRPC_UPB_GRPC_GENERATED_DIR} +- ${_gRPC_UPB_INCLUDE_DIR} +- ${_gRPC_XXHASH_INCLUDE_DIR} +- ${_gRPC_ZLIB_INCLUDE_DIR} +- ${_gRPC_PROTO_GENS_DIR} +-) +-target_link_libraries(grpc++_error_details +- ${_gRPC_ALLTARGETS_LIBRARIES} +- grpc++ +-) +- +-foreach(_hdr +- include/grpc++/support/error_details.h +- include/grpcpp/support/error_details.h +-) +- string(REPLACE "include/" "" _path ${_hdr}) +- get_filename_component(_path ${_path} PATH) +- install(FILES ${_hdr} +- DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}" +- ) +-endforeach() +- +- +-if(gRPC_INSTALL) +- install(TARGETS grpc++_error_details EXPORT gRPCTargets +- RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} +- BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} +- LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} +- ) +-endif() +- +- +-if(gRPC_BUILD_CODEGEN) +- +-add_library(grpc++_reflection +- ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1/reflection.pb.cc +- ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1/reflection.grpc.pb.cc +- ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1/reflection.pb.h +- ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1/reflection.grpc.pb.h +- ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.pb.cc +- ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc +- ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.pb.h +- ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h +- src/cpp/ext/proto_server_reflection.cc +- src/cpp/ext/proto_server_reflection_plugin.cc +-) +- +-target_compile_features(grpc++_reflection PUBLIC cxx_std_14) +- +-set_target_properties(grpc++_reflection PROPERTIES +- VERSION ${gRPC_CPP_VERSION} +- SOVERSION ${gRPC_CPP_SOVERSION} +-) +- +-if(WIN32 AND MSVC) +- set_target_properties(grpc++_reflection PROPERTIES COMPILE_PDB_NAME "grpc++_reflection" +- COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" +- ) +- if(gRPC_INSTALL) +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_reflection.pdb +- DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL +- ) +- endif() +-endif() +- +-target_include_directories(grpc++_reflection +- PUBLIC $ $ +- PRIVATE +- ${CMAKE_CURRENT_SOURCE_DIR} +- ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} +- ${_gRPC_RE2_INCLUDE_DIR} +- ${_gRPC_SSL_INCLUDE_DIR} +- ${_gRPC_UPB_GENERATED_DIR} +- ${_gRPC_UPB_GRPC_GENERATED_DIR} +- ${_gRPC_UPB_INCLUDE_DIR} +- ${_gRPC_XXHASH_INCLUDE_DIR} +- ${_gRPC_ZLIB_INCLUDE_DIR} +- ${_gRPC_PROTO_GENS_DIR} +-) +-target_link_libraries(grpc++_reflection +- ${_gRPC_ALLTARGETS_LIBRARIES} +- grpc++ +-) +- +-foreach(_hdr +- include/grpc++/ext/proto_server_reflection_plugin.h +- include/grpcpp/ext/proto_server_reflection_plugin.h +-) +- string(REPLACE "include/" "" _path ${_hdr}) +- get_filename_component(_path ${_path} PATH) +- install(FILES ${_hdr} +- DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}" +- ) +-endforeach() +-endif() +- +-if(gRPC_BUILD_CODEGEN) +- +-if(gRPC_INSTALL) +- install(TARGETS grpc++_reflection EXPORT gRPCTargets - RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} - BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} - LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} - ) -endif() - - if(gRPC_BUILD_TESTS) - -@@ -3589,207 +3119,6 @@ - endif() - - --add_library(grpc++_alts -- src/cpp/common/alts_context.cc -- src/cpp/common/alts_util.cc +- +-endif() +-if(gRPC_BUILD_TESTS) +- +- +-add_library(grpc++_test +- src/cpp/client/channel_test_peer.cc -) - --set_target_properties(grpc++_alts PROPERTIES +-target_compile_features(grpc++_test PUBLIC cxx_std_14) +- +-set_target_properties(grpc++_test PROPERTIES - VERSION ${gRPC_CPP_VERSION} - SOVERSION ${gRPC_CPP_SOVERSION} -) - -if(WIN32 AND MSVC) -- set_target_properties(grpc++_alts PROPERTIES COMPILE_PDB_NAME "grpc++_alts" +- set_target_properties(grpc++_test PROPERTIES COMPILE_PDB_NAME "grpc++_test" - COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" - ) - if(gRPC_INSTALL) -- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_alts.pdb +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_test.pdb - DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL - ) - endif() -endif() - --target_include_directories(grpc++_alts +-target_include_directories(grpc++_test - PUBLIC $ $ - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR} @@ -536,19 +1172,26 @@ - ${_gRPC_UPB_INCLUDE_DIR} - ${_gRPC_XXHASH_INCLUDE_DIR} - ${_gRPC_ZLIB_INCLUDE_DIR} +- third_party/googletest/googletest/include +- third_party/googletest/googletest +- third_party/googletest/googlemock/include +- third_party/googletest/googlemock - ${_gRPC_PROTO_GENS_DIR} -) --target_link_libraries(grpc++_alts -- ${_gRPC_BASELIB_LIBRARIES} -- ${_gRPC_PROTOBUF_LIBRARIES} -- ${_gRPC_ZLIB_LIBRARIES} +-target_link_libraries(grpc++_test - ${_gRPC_ALLTARGETS_LIBRARIES} +- gtest - grpc++ -) - -foreach(_hdr -- include/grpcpp/security/alts_context.h -- include/grpcpp/security/alts_util.h +- include/grpc++/test/mock_stream.h +- include/grpc++/test/server_context_test_spouse.h +- include/grpcpp/test/channel_test_peer.h +- include/grpcpp/test/client_context_test_peer.h +- include/grpcpp/test/default_reactor_test_peer.h +- include/grpcpp/test/mock_stream.h +- include/grpcpp/test/server_context_test_spouse.h -) - string(REPLACE "include/" "" _path ${_hdr}) - get_filename_component(_path ${_path} PATH) @@ -557,38 +1200,33 @@ - ) -endforeach() - -- --if(gRPC_INSTALL) -- install(TARGETS grpc++_alts EXPORT gRPCTargets -- RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} -- BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} -- LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} -- ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} -- ) -endif() +-if(gRPC_BUILD_TESTS) - - --add_library(grpc++_error_details -- src/cpp/util/error_details.cc +-add_library(grpc++_test_config +- test/cpp/util/test_config_cc.cc -) - --set_target_properties(grpc++_error_details PROPERTIES +-target_compile_features(grpc++_test_config PUBLIC cxx_std_14) +- +-set_target_properties(grpc++_test_config PROPERTIES - VERSION ${gRPC_CPP_VERSION} - SOVERSION ${gRPC_CPP_SOVERSION} -) - -if(WIN32 AND MSVC) -- set_target_properties(grpc++_error_details PROPERTIES COMPILE_PDB_NAME "grpc++_error_details" +- set_target_properties(grpc++_test_config PROPERTIES COMPILE_PDB_NAME "grpc++_test_config" - COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" - ) - if(gRPC_INSTALL) -- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_error_details.pdb +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_test_config.pdb - DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL - ) - endif() -endif() - --target_include_directories(grpc++_error_details +-target_include_directories(grpc++_test_config - PUBLIC $ $ - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR} @@ -602,63 +1240,60 @@ - ${_gRPC_ZLIB_INCLUDE_DIR} - ${_gRPC_PROTO_GENS_DIR} -) --target_link_libraries(grpc++_error_details -- ${_gRPC_BASELIB_LIBRARIES} -- ${_gRPC_PROTOBUF_LIBRARIES} -- ${_gRPC_ZLIB_LIBRARIES} +-target_link_libraries(grpc++_test_config - ${_gRPC_ALLTARGETS_LIBRARIES} -- grpc++ --) -- --foreach(_hdr -- include/grpc++/support/error_details.h -- include/grpcpp/support/error_details.h +- absl::flags_parse +- gpr -) -- string(REPLACE "include/" "" _path ${_hdr}) -- get_filename_component(_path ${_path} PATH) -- install(FILES ${_hdr} -- DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}" -- ) --endforeach() - - --if(gRPC_INSTALL) -- install(TARGETS grpc++_error_details EXPORT gRPCTargets -- RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} -- BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} -- LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} -- ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} -- ) -endif() +-if(gRPC_BUILD_TESTS) - - --if(gRPC_BUILD_CODEGEN) --add_library(grpc++_reflection -- ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.pb.cc -- ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc -- ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.pb.h -- ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h -- src/cpp/ext/proto_server_reflection.cc -- src/cpp/ext/proto_server_reflection_plugin.cc +-add_library(grpc++_test_util +- src/core/lib/gpr/subprocess_posix.cc +- src/core/lib/gpr/subprocess_windows.cc +- test/core/end2end/data/client_certs.cc +- test/core/end2end/data/server1_cert.cc +- test/core/end2end/data/server1_key.cc +- test/core/end2end/data/test_root_cert.cc +- test/core/util/cmdline.cc +- test/core/util/fuzzer_util.cc +- test/core/util/grpc_profiler.cc +- test/core/util/histogram.cc +- test/core/util/mock_endpoint.cc +- test/core/util/parse_hexstring.cc +- test/core/util/passthru_endpoint.cc +- test/core/util/resolve_localhost_ip46.cc +- test/core/util/slice_splitter.cc +- test/core/util/tracer_util.cc +- test/cpp/util/byte_buffer_proto_helper.cc +- test/cpp/util/create_test_channel.cc +- test/cpp/util/string_ref_helper.cc +- test/cpp/util/subprocess.cc +- test/cpp/util/test_credentials_provider.cc -) - --set_target_properties(grpc++_reflection PROPERTIES +-target_compile_features(grpc++_test_util PUBLIC cxx_std_14) +- +-set_target_properties(grpc++_test_util PROPERTIES - VERSION ${gRPC_CPP_VERSION} - SOVERSION ${gRPC_CPP_SOVERSION} -) - -if(WIN32 AND MSVC) -- set_target_properties(grpc++_reflection PROPERTIES COMPILE_PDB_NAME "grpc++_reflection" +- set_target_properties(grpc++_test_util PROPERTIES COMPILE_PDB_NAME "grpc++_test_util" - COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" - ) - if(gRPC_INSTALL) -- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_reflection.pdb +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_test_util.pdb - DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL - ) - endif() -endif() - --target_include_directories(grpc++_reflection +-target_include_directories(grpc++_test_util - PUBLIC $ $ - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR} @@ -672,57 +1307,28 @@ - ${_gRPC_ZLIB_INCLUDE_DIR} - ${_gRPC_PROTO_GENS_DIR} -) --target_link_libraries(grpc++_reflection -- ${_gRPC_BASELIB_LIBRARIES} -- ${_gRPC_PROTOBUF_LIBRARIES} -- ${_gRPC_ZLIB_LIBRARIES} +-target_link_libraries(grpc++_test_util - ${_gRPC_ALLTARGETS_LIBRARIES} - grpc++ +- grpc_test_util -) - --foreach(_hdr -- include/grpc++/ext/proto_server_reflection_plugin.h -- include/grpcpp/ext/proto_server_reflection_plugin.h --) -- string(REPLACE "include/" "" _path ${_hdr}) -- get_filename_component(_path ${_path} PATH) -- install(FILES ${_hdr} -- DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}" -- ) --endforeach() --endif() -- --if(gRPC_BUILD_CODEGEN) - --if(gRPC_INSTALL) -- install(TARGETS grpc++_reflection EXPORT gRPCTargets -- RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} -- BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} -- LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} -- ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} -- ) -endif() - --endif() - if(gRPC_BUILD_TESTS) - - add_library(grpc++_test -@@ -3979,671 +3308,6 @@ - - endif() - +- -add_library(grpc++_unsecure - src/cpp/client/channel_cc.cc - src/cpp/client/client_callback.cc - src/cpp/client/client_context.cc - src/cpp/client/client_interceptor.cc +- src/cpp/client/client_stats_interceptor.cc - src/cpp/client/create_channel.cc - src/cpp/client/create_channel_internal.cc - src/cpp/client/create_channel_posix.cc - src/cpp/client/insecure_credentials.cc - src/cpp/common/alarm.cc - src/cpp/common/channel_arguments.cc -- src/cpp/common/channel_filter.cc - src/cpp/common/completion_queue_cc.cc - src/cpp/common/insecure_create_auth_context.cc - src/cpp/common/resource_quota_cc.cc @@ -730,6 +1336,7 @@ - src/cpp/common/validate_service_config.cc - src/cpp/common/version_cc.cc - src/cpp/server/async_generic_service.cc +- src/cpp/server/backend_metric_recorder.cc - src/cpp/server/channel_argument_option.cc - src/cpp/server/create_default_thread_pool.cc - src/cpp/server/external_connection_acceptor_impl.cc @@ -737,7 +1344,6 @@ - src/cpp/server/health/health_check_service.cc - src/cpp/server/health/health_check_service_server_builder_option.cc - src/cpp/server/insecure_server_credentials.cc -- src/cpp/server/orca/call_metric_recorder.cc - src/cpp/server/server_builder.cc - src/cpp/server/server_callback.cc - src/cpp/server/server_cc.cc @@ -748,8 +1354,11 @@ - src/cpp/util/status.cc - src/cpp/util/string_ref.cc - src/cpp/util/time_cc.cc +- ${gRPC_UPB_GEN_DUPL_SRC} -) - +-target_compile_features(grpc++_unsecure PUBLIC cxx_std_14) +- -set_target_properties(grpc++_unsecure PROPERTIES - VERSION ${gRPC_CPP_VERSION} - SOVERSION ${gRPC_CPP_SOVERSION} @@ -759,6 +1368,10 @@ - set_target_properties(grpc++_unsecure PROPERTIES COMPILE_PDB_NAME "grpc++_unsecure" - COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" - ) +- set_target_properties(grpc++_unsecure PROPERTIES DEFINE_SYMBOL "GRPCXX_DLL_EXPORTS") +- if(BUILD_SHARED_LIBS) +- target_compile_definitions(grpc++_unsecure INTERFACE GRPCXX_DLL_IMPORTS) +- endif() - if(gRPC_INSTALL) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_unsecure.pdb - DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL @@ -781,11 +1394,9 @@ - ${_gRPC_PROTO_GENS_DIR} -) -target_link_libraries(grpc++_unsecure -- ${_gRPC_BASELIB_LIBRARIES} -- ${_gRPC_PROTOBUF_LIBRARIES} -- ${_gRPC_ZLIB_LIBRARIES} - ${_gRPC_ALLTARGETS_LIBRARIES} - grpc_unsecure +- ${_gRPC_PROTOBUF_LIBRARIES} -) - -foreach(_hdr @@ -871,6 +1482,7 @@ - include/grpcpp/create_channel_posix.h - include/grpcpp/ext/call_metric_recorder.h - include/grpcpp/ext/health_check_service_server_builder_option.h +- include/grpcpp/ext/server_metric_recorder.h - include/grpcpp/generic/async_generic_service.h - include/grpcpp/generic/generic_stub.h - include/grpcpp/grpcpp.h @@ -950,6 +1562,7 @@ - include/grpcpp/impl/status.h - include/grpcpp/impl/sync.h - include/grpcpp/resource_quota.h +- include/grpcpp/security/audit_logging.h - include/grpcpp/security/auth_context.h - include/grpcpp/security/auth_metadata_processor.h - include/grpcpp/security/authorization_policy_provider.h @@ -958,6 +1571,7 @@ - include/grpcpp/security/tls_certificate_provider.h - include/grpcpp/security/tls_certificate_verifier.h - include/grpcpp/security/tls_credentials_options.h +- include/grpcpp/security/tls_crl_provider.h - include/grpcpp/server.h - include/grpcpp/server_builder.h - include/grpcpp/server_context.h @@ -1006,24 +1620,31 @@ -endif() - - +- -add_library(grpc_authorization_provider -- src/core/ext/upb-generated/google/protobuf/any.upb.c -- src/core/ext/upb-generated/google/rpc/status.upb.c -- src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c -- src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c -- src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c +- src/core/ext/upb-gen/google/protobuf/any.upb_minitable.c +- src/core/ext/upb-gen/google/protobuf/descriptor.upb_minitable.c +- src/core/ext/upb-gen/google/rpc/status.upb_minitable.c +- src/core/ext/upb-gen/src/proto/grpc/gcp/altscontext.upb_minitable.c +- src/core/ext/upb-gen/src/proto/grpc/gcp/handshaker.upb_minitable.c +- src/core/ext/upb-gen/src/proto/grpc/gcp/transport_security_common.upb_minitable.c - src/core/lib/address_utils/parse_address.cc - src/core/lib/address_utils/sockaddr_utils.cc +- src/core/lib/backoff/backoff.cc +- src/core/lib/backoff/random_early_detection.cc +- src/core/lib/channel/call_tracer.cc - src/core/lib/channel/channel_args.cc - src/core/lib/channel/channel_args_preconditioning.cc - src/core/lib/channel/channel_stack.cc - src/core/lib/channel/channel_stack_builder.cc - src/core/lib/channel/channel_stack_builder_impl.cc +- src/core/lib/channel/channel_stack_trace.cc - src/core/lib/channel/channel_trace.cc - src/core/lib/channel/channelz.cc - src/core/lib/channel/channelz_registry.cc - src/core/lib/channel/connected_channel.cc - src/core/lib/channel/promise_based_filter.cc +- src/core/lib/channel/server_call_tracer_filter.cc - src/core/lib/channel/status_util.cc - src/core/lib/compression/compression.cc - src/core/lib/compression/compression_internal.cc @@ -1034,9 +1655,14 @@ - src/core/lib/debug/stats.cc - src/core/lib/debug/stats_data.cc - src/core/lib/debug/trace.cc +- src/core/lib/event_engine/ares_resolver.cc +- src/core/lib/event_engine/cf_engine/cf_engine.cc +- src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc +- src/core/lib/event_engine/cf_engine/dns_service_resolver.cc - src/core/lib/event_engine/channel_args_endpoint_config.cc - src/core/lib/event_engine/default_event_engine.cc - src/core/lib/event_engine/default_event_engine_factory.cc +- src/core/lib/event_engine/event_engine.cc - src/core/lib/event_engine/forkable.cc - src/core/lib/event_engine/memory_allocator.cc - src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc @@ -1057,19 +1683,29 @@ - src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc - src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc - src/core/lib/event_engine/resolved_address.cc +- src/core/lib/event_engine/shim.cc - src/core/lib/event_engine/slice.cc - src/core/lib/event_engine/slice_buffer.cc - src/core/lib/event_engine/tcp_socket_utils.cc -- src/core/lib/event_engine/thread_pool.cc +- src/core/lib/event_engine/thread_pool/thread_count.cc +- src/core/lib/event_engine/thread_pool/thread_pool_factory.cc +- src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc +- src/core/lib/event_engine/thready_event_engine/thready_event_engine.cc - src/core/lib/event_engine/time_util.cc - src/core/lib/event_engine/trace.cc - src/core/lib/event_engine/utils.cc +- src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc - src/core/lib/event_engine/windows/iocp.cc - src/core/lib/event_engine/windows/win_socket.cc +- src/core/lib/event_engine/windows/windows_endpoint.cc - src/core/lib/event_engine/windows/windows_engine.cc +- src/core/lib/event_engine/windows/windows_listener.cc +- src/core/lib/event_engine/work_queue/basic_work_queue.cc - src/core/lib/experiments/config.cc - src/core/lib/experiments/experiments.cc - src/core/lib/gprpp/load_file.cc +- src/core/lib/gprpp/per_cpu.cc +- src/core/lib/gprpp/ref_counted_string.cc - src/core/lib/gprpp/status_helper.cc - src/core/lib/gprpp/time.cc - src/core/lib/gprpp/time_averaged_stats.cc @@ -1079,6 +1715,7 @@ - src/core/lib/iomgr/buffer_list.cc - src/core/lib/iomgr/call_combiner.cc - src/core/lib/iomgr/cfstream_handle.cc +- src/core/lib/iomgr/closure.cc - src/core/lib/iomgr/combiner.cc - src/core/lib/iomgr/dualstack_socket_posix.cc - src/core/lib/iomgr/endpoint.cc @@ -1092,6 +1729,9 @@ - src/core/lib/iomgr/ev_poll_posix.cc - src/core/lib/iomgr/ev_posix.cc - src/core/lib/iomgr/ev_windows.cc +- src/core/lib/iomgr/event_engine_shims/closure.cc +- src/core/lib/iomgr/event_engine_shims/endpoint.cc +- src/core/lib/iomgr/event_engine_shims/tcp_client.cc - src/core/lib/iomgr/exec_ctx.cc - src/core/lib/iomgr/executor.cc - src/core/lib/iomgr/fork_posix.cc @@ -1145,6 +1785,7 @@ - src/core/lib/iomgr/timer_manager.cc - src/core/lib/iomgr/unix_sockets_posix.cc - src/core/lib/iomgr/unix_sockets_posix_noop.cc +- src/core/lib/iomgr/vsock.cc - src/core/lib/iomgr/wakeup_fd_eventfd.cc - src/core/lib/iomgr/wakeup_fd_nospecial.cc - src/core/lib/iomgr/wakeup_fd_pipe.cc @@ -1155,10 +1796,11 @@ - src/core/lib/load_balancing/lb_policy_registry.cc - src/core/lib/matchers/matchers.cc - src/core/lib/promise/activity.cc -- src/core/lib/promise/pipe.cc +- src/core/lib/promise/party.cc +- src/core/lib/promise/trace.cc +- src/core/lib/resolver/endpoint_addresses.cc - src/core/lib/resolver/resolver.cc - src/core/lib/resolver/resolver_registry.cc -- src/core/lib/resolver/server_address.cc - src/core/lib/resource_quota/api.cc - src/core/lib/resource_quota/arena.cc - src/core/lib/resource_quota/memory_quota.cc @@ -1166,6 +1808,7 @@ - src/core/lib/resource_quota/resource_quota.cc - src/core/lib/resource_quota/thread_quota.cc - src/core/lib/resource_quota/trace.cc +- src/core/lib/security/authorization/audit_logging.cc - src/core/lib/security/authorization/authorization_policy_provider_vtable.cc - src/core/lib/security/authorization/evaluate_args.cc - src/core/lib/security/authorization/grpc_authorization_engine.cc @@ -1174,6 +1817,7 @@ - src/core/lib/security/authorization/matchers.cc - src/core/lib/security/authorization/rbac_policy.cc - src/core/lib/security/authorization/rbac_translator.cc +- src/core/lib/security/authorization/stdout_logger.cc - src/core/lib/security/certificate_provider/certificate_provider_registry.cc - src/core/lib/security/context/security_context.cc - src/core/lib/security/credentials/alts/check_gcp_environment.cc @@ -1202,6 +1846,7 @@ - src/core/lib/slice/percent_encoding.cc - src/core/lib/slice/slice.cc - src/core/lib/slice/slice_buffer.cc +- src/core/lib/slice/slice_refcount.cc - src/core/lib/slice/slice_string_helpers.cc - src/core/lib/surface/api_trace.cc - src/core/lib/surface/builtins.cc @@ -1224,6 +1869,7 @@ - src/core/lib/surface/server.cc - src/core/lib/surface/validate_metadata.cc - src/core/lib/surface/version.cc +- src/core/lib/transport/batch_builder.cc - src/core/lib/transport/connectivity_state.cc - src/core/lib/transport/error_utils.cc - src/core/lib/transport/handshaker.cc @@ -1238,60 +1884,325 @@ - src/core/tsi/alts/handshaker/transport_security_common_api.cc - src/core/tsi/transport_security.cc - src/core/tsi/transport_security_grpc.cc --) -- ++ ) ++ endif() ++endif() ++ ++target_include_directories(grpc++ ++ PUBLIC $ $ ++ PRIVATE ++ ${CMAKE_CURRENT_SOURCE_DIR} ++ ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} ++ ${_gRPC_RE2_INCLUDE_DIR} ++ ${_gRPC_SSL_INCLUDE_DIR} ++ ${_gRPC_UPB_GENERATED_DIR} ++ ${_gRPC_UPB_GRPC_GENERATED_DIR} ++ ${_gRPC_UPB_INCLUDE_DIR} ++ ${_gRPC_XXHASH_INCLUDE_DIR} ++ ${_gRPC_ZLIB_INCLUDE_DIR} ++ ${_gRPC_PROTO_GENS_DIR} ++) ++target_link_libraries(grpc++ ++ ${_gRPC_ALLTARGETS_LIBRARIES} ++ grpc ++ ${_gRPC_PROTOBUF_LIBRARIES} ++) ++ ++foreach(_hdr ++ include/grpc++/alarm.h ++ include/grpc++/channel.h ++ include/grpc++/client_context.h ++ include/grpc++/completion_queue.h ++ include/grpc++/create_channel.h ++ include/grpc++/create_channel_posix.h ++ include/grpc++/ext/health_check_service_server_builder_option.h ++ include/grpc++/generic/async_generic_service.h ++ include/grpc++/generic/generic_stub.h ++ include/grpc++/grpc++.h ++ include/grpc++/health_check_service_interface.h ++ include/grpc++/impl/call.h ++ include/grpc++/impl/channel_argument_option.h ++ include/grpc++/impl/client_unary_call.h ++ include/grpc++/impl/codegen/async_stream.h ++ include/grpc++/impl/codegen/async_unary_call.h ++ include/grpc++/impl/codegen/byte_buffer.h ++ include/grpc++/impl/codegen/call.h ++ include/grpc++/impl/codegen/call_hook.h ++ include/grpc++/impl/codegen/channel_interface.h ++ include/grpc++/impl/codegen/client_context.h ++ include/grpc++/impl/codegen/client_unary_call.h ++ include/grpc++/impl/codegen/completion_queue.h ++ include/grpc++/impl/codegen/completion_queue_tag.h ++ include/grpc++/impl/codegen/config.h ++ include/grpc++/impl/codegen/config_protobuf.h ++ include/grpc++/impl/codegen/create_auth_context.h ++ include/grpc++/impl/codegen/metadata_map.h ++ include/grpc++/impl/codegen/method_handler_impl.h ++ include/grpc++/impl/codegen/proto_utils.h ++ include/grpc++/impl/codegen/rpc_method.h ++ include/grpc++/impl/codegen/rpc_service_method.h ++ include/grpc++/impl/codegen/security/auth_context.h ++ include/grpc++/impl/codegen/serialization_traits.h ++ include/grpc++/impl/codegen/server_context.h ++ include/grpc++/impl/codegen/server_interface.h ++ include/grpc++/impl/codegen/service_type.h ++ include/grpc++/impl/codegen/slice.h ++ include/grpc++/impl/codegen/status.h ++ include/grpc++/impl/codegen/status_code_enum.h ++ include/grpc++/impl/codegen/string_ref.h ++ include/grpc++/impl/codegen/stub_options.h ++ include/grpc++/impl/codegen/sync_stream.h ++ include/grpc++/impl/codegen/time.h ++ include/grpc++/impl/grpc_library.h ++ include/grpc++/impl/method_handler_impl.h ++ include/grpc++/impl/rpc_method.h ++ include/grpc++/impl/rpc_service_method.h ++ include/grpc++/impl/serialization_traits.h ++ include/grpc++/impl/server_builder_option.h ++ include/grpc++/impl/server_builder_plugin.h ++ include/grpc++/impl/server_initializer.h ++ include/grpc++/impl/service_type.h ++ include/grpc++/resource_quota.h ++ include/grpc++/security/auth_context.h ++ include/grpc++/security/auth_metadata_processor.h ++ include/grpc++/security/credentials.h ++ include/grpc++/security/server_credentials.h ++ include/grpc++/server.h ++ include/grpc++/server_builder.h ++ include/grpc++/server_context.h ++ include/grpc++/server_posix.h ++ include/grpc++/support/async_stream.h ++ include/grpc++/support/async_unary_call.h ++ include/grpc++/support/byte_buffer.h ++ include/grpc++/support/channel_arguments.h ++ include/grpc++/support/config.h ++ include/grpc++/support/slice.h ++ include/grpc++/support/status.h ++ include/grpc++/support/status_code_enum.h ++ include/grpc++/support/string_ref.h ++ include/grpc++/support/stub_options.h ++ include/grpc++/support/sync_stream.h ++ include/grpc++/support/time.h ++ include/grpcpp/alarm.h ++ include/grpcpp/channel.h ++ include/grpcpp/client_context.h ++ include/grpcpp/completion_queue.h ++ include/grpcpp/create_channel.h ++ include/grpcpp/create_channel_binder.h ++ include/grpcpp/create_channel_posix.h ++ include/grpcpp/ext/call_metric_recorder.h ++ include/grpcpp/ext/health_check_service_server_builder_option.h ++ include/grpcpp/ext/server_metric_recorder.h ++ include/grpcpp/generic/async_generic_service.h ++ include/grpcpp/generic/generic_stub.h ++ include/grpcpp/grpcpp.h ++ include/grpcpp/health_check_service_interface.h ++ include/grpcpp/impl/call.h ++ include/grpcpp/impl/call_hook.h ++ include/grpcpp/impl/call_op_set.h ++ include/grpcpp/impl/call_op_set_interface.h ++ include/grpcpp/impl/channel_argument_option.h ++ include/grpcpp/impl/channel_interface.h ++ include/grpcpp/impl/client_unary_call.h ++ include/grpcpp/impl/codegen/async_generic_service.h ++ include/grpcpp/impl/codegen/async_stream.h ++ include/grpcpp/impl/codegen/async_unary_call.h ++ include/grpcpp/impl/codegen/byte_buffer.h ++ include/grpcpp/impl/codegen/call.h ++ include/grpcpp/impl/codegen/call_hook.h ++ include/grpcpp/impl/codegen/call_op_set.h ++ include/grpcpp/impl/codegen/call_op_set_interface.h ++ include/grpcpp/impl/codegen/callback_common.h ++ include/grpcpp/impl/codegen/channel_interface.h ++ include/grpcpp/impl/codegen/client_callback.h ++ include/grpcpp/impl/codegen/client_context.h ++ include/grpcpp/impl/codegen/client_interceptor.h ++ include/grpcpp/impl/codegen/client_unary_call.h ++ include/grpcpp/impl/codegen/completion_queue.h ++ include/grpcpp/impl/codegen/completion_queue_tag.h ++ include/grpcpp/impl/codegen/config.h ++ include/grpcpp/impl/codegen/config_protobuf.h ++ include/grpcpp/impl/codegen/create_auth_context.h ++ include/grpcpp/impl/codegen/delegating_channel.h ++ include/grpcpp/impl/codegen/intercepted_channel.h ++ include/grpcpp/impl/codegen/interceptor.h ++ include/grpcpp/impl/codegen/interceptor_common.h ++ include/grpcpp/impl/codegen/message_allocator.h ++ include/grpcpp/impl/codegen/metadata_map.h ++ include/grpcpp/impl/codegen/method_handler.h ++ include/grpcpp/impl/codegen/method_handler_impl.h ++ include/grpcpp/impl/codegen/proto_buffer_reader.h ++ include/grpcpp/impl/codegen/proto_buffer_writer.h ++ include/grpcpp/impl/codegen/proto_utils.h ++ include/grpcpp/impl/codegen/rpc_method.h ++ include/grpcpp/impl/codegen/rpc_service_method.h ++ include/grpcpp/impl/codegen/security/auth_context.h ++ include/grpcpp/impl/codegen/serialization_traits.h ++ include/grpcpp/impl/codegen/server_callback.h ++ include/grpcpp/impl/codegen/server_callback_handlers.h ++ include/grpcpp/impl/codegen/server_context.h ++ include/grpcpp/impl/codegen/server_interceptor.h ++ include/grpcpp/impl/codegen/server_interface.h ++ include/grpcpp/impl/codegen/service_type.h ++ include/grpcpp/impl/codegen/slice.h ++ include/grpcpp/impl/codegen/status.h ++ include/grpcpp/impl/codegen/status_code_enum.h ++ include/grpcpp/impl/codegen/string_ref.h ++ include/grpcpp/impl/codegen/stub_options.h ++ include/grpcpp/impl/codegen/sync.h ++ include/grpcpp/impl/codegen/sync_stream.h ++ include/grpcpp/impl/codegen/time.h ++ include/grpcpp/impl/completion_queue_tag.h ++ include/grpcpp/impl/create_auth_context.h ++ include/grpcpp/impl/delegating_channel.h ++ include/grpcpp/impl/grpc_library.h ++ include/grpcpp/impl/intercepted_channel.h ++ include/grpcpp/impl/interceptor_common.h ++ include/grpcpp/impl/metadata_map.h ++ include/grpcpp/impl/method_handler_impl.h ++ include/grpcpp/impl/proto_utils.h ++ include/grpcpp/impl/rpc_method.h ++ include/grpcpp/impl/rpc_service_method.h ++ include/grpcpp/impl/serialization_traits.h ++ include/grpcpp/impl/server_builder_option.h ++ include/grpcpp/impl/server_builder_plugin.h ++ include/grpcpp/impl/server_callback_handlers.h ++ include/grpcpp/impl/server_initializer.h ++ include/grpcpp/impl/service_type.h ++ include/grpcpp/impl/status.h ++ include/grpcpp/impl/sync.h ++ include/grpcpp/resource_quota.h ++ include/grpcpp/security/audit_logging.h ++ include/grpcpp/security/auth_context.h ++ include/grpcpp/security/auth_metadata_processor.h ++ include/grpcpp/security/authorization_policy_provider.h ++ include/grpcpp/security/binder_credentials.h ++ include/grpcpp/security/binder_security_policy.h ++ include/grpcpp/security/credentials.h ++ include/grpcpp/security/server_credentials.h ++ include/grpcpp/security/tls_certificate_provider.h ++ include/grpcpp/security/tls_certificate_verifier.h ++ include/grpcpp/security/tls_credentials_options.h ++ include/grpcpp/security/tls_crl_provider.h ++ include/grpcpp/server.h ++ include/grpcpp/server_builder.h ++ include/grpcpp/server_context.h ++ include/grpcpp/server_interface.h ++ include/grpcpp/server_posix.h ++ include/grpcpp/support/async_stream.h ++ include/grpcpp/support/async_unary_call.h ++ include/grpcpp/support/byte_buffer.h ++ include/grpcpp/support/callback_common.h ++ include/grpcpp/support/channel_arguments.h ++ include/grpcpp/support/client_callback.h ++ include/grpcpp/support/client_interceptor.h ++ include/grpcpp/support/config.h ++ include/grpcpp/support/interceptor.h ++ include/grpcpp/support/message_allocator.h ++ include/grpcpp/support/method_handler.h ++ include/grpcpp/support/proto_buffer_reader.h ++ include/grpcpp/support/proto_buffer_writer.h ++ include/grpcpp/support/server_callback.h ++ include/grpcpp/support/server_interceptor.h ++ include/grpcpp/support/slice.h ++ include/grpcpp/support/status.h ++ include/grpcpp/support/status_code_enum.h ++ include/grpcpp/support/string_ref.h ++ include/grpcpp/support/stub_options.h ++ include/grpcpp/support/sync_stream.h ++ include/grpcpp/support/time.h ++ include/grpcpp/support/validate_service_config.h ++ include/grpcpp/version_info.h ++ include/grpcpp/xds_server_builder.h ++) ++ string(REPLACE "include/" "" _path ${_hdr}) ++ get_filename_component(_path ${_path} PATH) ++ install(FILES ${_hdr} ++ DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}" ++ ) ++endforeach() ++ ++ ++if(gRPC_INSTALL) ++ install(TARGETS grpc++ EXPORT gRPCTargets ++ RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} ++ BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} ++ ) ++endif() ++ ++ ++if(gRPC_BUILD_TESTS) ++ ++ ++add_library(grpc++_test ++ src/cpp/client/channel_test_peer.cc + ) + +-target_compile_features(grpc_authorization_provider PUBLIC cxx_std_14) ++target_compile_features(grpc++_test PUBLIC cxx_std_14) + -set_target_properties(grpc_authorization_provider PROPERTIES -- VERSION ${gRPC_CPP_VERSION} -- SOVERSION ${gRPC_CPP_SOVERSION} --) -- --if(WIN32 AND MSVC) ++set_target_properties(grpc++_test PROPERTIES + VERSION ${gRPC_CPP_VERSION} + SOVERSION ${gRPC_CPP_SOVERSION} + ) + + if(WIN32 AND MSVC) - set_target_properties(grpc_authorization_provider PROPERTIES COMPILE_PDB_NAME "grpc_authorization_provider" -- COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" -- ) -- if(gRPC_INSTALL) ++ set_target_properties(grpc++_test PROPERTIES COMPILE_PDB_NAME "grpc++_test" + COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" + ) + if(gRPC_INSTALL) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_authorization_provider.pdb -- DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL -- ) -- endif() --endif() -- ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_test.pdb + DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL + ) + endif() + endif() + -target_include_directories(grpc_authorization_provider -- PUBLIC $ $ -- PRIVATE -- ${CMAKE_CURRENT_SOURCE_DIR} -- ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} -- ${_gRPC_RE2_INCLUDE_DIR} -- ${_gRPC_SSL_INCLUDE_DIR} -- ${_gRPC_UPB_GENERATED_DIR} -- ${_gRPC_UPB_GRPC_GENERATED_DIR} -- ${_gRPC_UPB_INCLUDE_DIR} -- ${_gRPC_XXHASH_INCLUDE_DIR} -- ${_gRPC_ZLIB_INCLUDE_DIR} -- ${_gRPC_PROTO_GENS_DIR} --) ++target_include_directories(grpc++_test + PUBLIC $ $ + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} +@@ -5213,101 +3720,26 @@ target_include_directories(grpc_authorization_provider + ${_gRPC_UPB_INCLUDE_DIR} + ${_gRPC_XXHASH_INCLUDE_DIR} + ${_gRPC_ZLIB_INCLUDE_DIR} ++ third_party/googletest/googletest/include ++ third_party/googletest/googletest ++ third_party/googletest/googlemock/include ++ third_party/googletest/googlemock + ${_gRPC_PROTO_GENS_DIR} + ) -target_link_libraries(grpc_authorization_provider -- ${_gRPC_BASELIB_LIBRARIES} -- ${_gRPC_PROTOBUF_LIBRARIES} -- ${_gRPC_ZLIB_LIBRARIES} ++target_link_libraries(grpc++_test + ${_gRPC_ALLTARGETS_LIBRARIES} +- upb - ${_gRPC_RE2_LIBRARIES} -- ${_gRPC_ALLTARGETS_LIBRARIES} +- utf8_range_lib +- ${_gRPC_ZLIB_LIBRARIES} - absl::cleanup - absl::flat_hash_map - absl::flat_hash_set - absl::inlined_vector -- absl::any_invocable - absl::function_ref - absl::hash - absl::type_traits +- absl::random_bit_gen_ref +- absl::random_distributions - absl::statusor - absl::span - absl::utility +- ${_gRPC_CARES_LIBRARIES} - gpr -- upb --) -- --foreach(_hdr ++ gtest ++ grpc++ + ) + + foreach(_hdr - include/grpc/byte_buffer.h - include/grpc/byte_buffer_reader.h - include/grpc/compression.h @@ -1306,9 +2217,12 @@ - include/grpc/event_engine/slice_buffer.h - include/grpc/fork.h - include/grpc/grpc.h +- include/grpc/grpc_audit_logging.h +- include/grpc/grpc_crl_provider.h - include/grpc/grpc_posix.h - include/grpc/grpc_security.h - include/grpc/grpc_security_constants.h +- include/grpc/impl/channel_arg_names.h - include/grpc/impl/codegen/atm.h - include/grpc/impl/codegen/atm_gcc_atomic.h - include/grpc/impl/codegen/atm_gcc_sync.h @@ -1345,6 +2259,7 @@ - include/grpc/support/atm_gcc_sync.h - include/grpc/support/atm_windows.h - include/grpc/support/cpu.h +- include/grpc/support/json.h - include/grpc/support/log.h - include/grpc/support/log_windows.h - include/grpc/support/port_platform.h @@ -1358,34 +2273,174 @@ - include/grpc/support/thd_id.h - include/grpc/support/time.h - include/grpc/support/workaround_list.h --) ++ include/grpc++/test/mock_stream.h ++ include/grpc++/test/server_context_test_spouse.h ++ include/grpcpp/test/channel_test_peer.h ++ include/grpcpp/test/client_context_test_peer.h ++ include/grpcpp/test/default_reactor_test_peer.h ++ include/grpcpp/test/mock_stream.h ++ include/grpcpp/test/server_context_test_spouse.h + ) + string(REPLACE "include/" "" _path ${_hdr}) + get_filename_component(_path ${_path} PATH) +@@ -5316,48 +3748,33 @@ foreach(_hdr + ) + endforeach() + +- +-if(gRPC_INSTALL) +- install(TARGETS grpc_authorization_provider EXPORT gRPCTargets +- RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} +- BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} +- LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} +- ) + endif() ++if(gRPC_BUILD_TESTS) + + +- +-add_library(grpc_plugin_support +- src/compiler/cpp_generator.cc +- src/compiler/csharp_generator.cc +- src/compiler/node_generator.cc +- src/compiler/objective_c_generator.cc +- src/compiler/php_generator.cc +- src/compiler/proto_parser_helper.cc +- src/compiler/python_generator.cc +- src/compiler/ruby_generator.cc ++add_library(grpc++_test_config ++ test/cpp/util/test_config_cc.cc + ) + +-target_compile_features(grpc_plugin_support PUBLIC cxx_std_14) ++target_compile_features(grpc++_test_config PUBLIC cxx_std_14) + +-set_target_properties(grpc_plugin_support PROPERTIES ++set_target_properties(grpc++_test_config PROPERTIES + VERSION ${gRPC_CPP_VERSION} + SOVERSION ${gRPC_CPP_SOVERSION} + ) + + if(WIN32 AND MSVC) +- set_target_properties(grpc_plugin_support PROPERTIES COMPILE_PDB_NAME "grpc_plugin_support" ++ set_target_properties(grpc++_test_config PROPERTIES COMPILE_PDB_NAME "grpc++_test_config" + COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" + ) + if(gRPC_INSTALL) +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_plugin_support.pdb ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_test_config.pdb + DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL + ) + endif() + endif() + +-target_include_directories(grpc_plugin_support ++target_include_directories(grpc++_test_config + PUBLIC $ $ + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} +@@ -5371,66 +3788,113 @@ target_include_directories(grpc_plugin_support + ${_gRPC_ZLIB_INCLUDE_DIR} + ${_gRPC_PROTO_GENS_DIR} + ) +-target_link_libraries(grpc_plugin_support ++target_link_libraries(grpc++_test_config + ${_gRPC_ALLTARGETS_LIBRARIES} +- ${_gRPC_PROTOBUF_LIBRARIES} +- ${_gRPC_PROTOBUF_PROTOC_LIBRARIES} ++ absl::flags_parse ++ gpr + ) + +-foreach(_hdr +- include/grpc++/impl/codegen/config_protobuf.h +- include/grpcpp/impl/codegen/config_protobuf.h ++ ++endif() ++if(gRPC_BUILD_TESTS) ++ ++ ++add_library(grpc++_test_util ++ src/core/lib/gpr/subprocess_posix.cc ++ src/core/lib/gpr/subprocess_windows.cc ++ test/core/end2end/data/client_certs.cc ++ test/core/end2end/data/server1_cert.cc ++ test/core/end2end/data/server1_key.cc ++ test/core/end2end/data/test_root_cert.cc ++ test/core/util/cmdline.cc ++ test/core/util/fuzzer_util.cc ++ test/core/util/grpc_profiler.cc ++ test/core/util/histogram.cc ++ test/core/util/mock_endpoint.cc ++ test/core/util/parse_hexstring.cc ++ test/core/util/passthru_endpoint.cc ++ test/core/util/resolve_localhost_ip46.cc ++ test/core/util/slice_splitter.cc ++ test/core/util/tracer_util.cc ++ test/cpp/util/byte_buffer_proto_helper.cc ++ test/cpp/util/create_test_channel.cc ++ test/cpp/util/string_ref_helper.cc ++ test/cpp/util/subprocess.cc ++ test/cpp/util/test_credentials_provider.cc + ) - string(REPLACE "include/" "" _path ${_hdr}) - get_filename_component(_path ${_path} PATH) - install(FILES ${_hdr} - DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}" - ) -endforeach() -- -- + ++target_compile_features(grpc++_test_util PUBLIC cxx_std_14) + -if(gRPC_INSTALL) -- install(TARGETS grpc_authorization_provider EXPORT gRPCTargets +- install(TARGETS grpc_plugin_support EXPORT gRPCTargets - RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} - BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} - LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} -- ) --endif() -- - - add_library(grpc_plugin_support - src/compiler/cpp_generator.cc -@@ -4715,82 +3379,6 @@ ++set_target_properties(grpc++_test_util PROPERTIES ++ VERSION ${gRPC_CPP_VERSION} ++ SOVERSION ${gRPC_CPP_SOVERSION} ++) ++ ++if(WIN32 AND MSVC) ++ set_target_properties(grpc++_test_util PROPERTIES COMPILE_PDB_NAME "grpc++_test_util" ++ COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" + ) ++ if(gRPC_INSTALL) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_test_util.pdb ++ DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL ++ ) ++ endif() endif() ++target_include_directories(grpc++_test_util ++ PUBLIC $ $ ++ PRIVATE ++ ${CMAKE_CURRENT_SOURCE_DIR} ++ ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} ++ ${_gRPC_RE2_INCLUDE_DIR} ++ ${_gRPC_SSL_INCLUDE_DIR} ++ ${_gRPC_UPB_GENERATED_DIR} ++ ${_gRPC_UPB_GRPC_GENERATED_DIR} ++ ${_gRPC_UPB_INCLUDE_DIR} ++ ${_gRPC_XXHASH_INCLUDE_DIR} ++ ${_gRPC_ZLIB_INCLUDE_DIR} ++ ${_gRPC_PROTO_GENS_DIR} ++) ++target_link_libraries(grpc++_test_util ++ ${_gRPC_ALLTARGETS_LIBRARIES} ++ grpc++ ++ grpc_test_util ++) ++ -# grpcpp_channelz doesn't build with protobuf-lite -# See https://github.com/grpc/grpc/issues/19473 -if(gRPC_BUILD_CODEGEN AND NOT gRPC_USE_PROTO_LITE) ++endif() + -add_library(grpcpp_channelz - ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/channelz/channelz.pb.cc - ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/channelz/channelz.grpc.pb.cc @@ -1393,77 +2448,99 @@ - ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/channelz/channelz.grpc.pb.h - src/cpp/server/channelz/channelz_service.cc - src/cpp/server/channelz/channelz_service_plugin.cc --) -- ++ ++add_library(grpc_plugin_support ++ src/compiler/cpp_generator.cc ++ src/compiler/csharp_generator.cc ++ src/compiler/node_generator.cc ++ src/compiler/objective_c_generator.cc ++ src/compiler/php_generator.cc ++ src/compiler/proto_parser_helper.cc ++ src/compiler/python_generator.cc ++ src/compiler/ruby_generator.cc + ) + +-target_compile_features(grpcpp_channelz PUBLIC cxx_std_14) ++target_compile_features(grpc_plugin_support PUBLIC cxx_std_14) + -set_target_properties(grpcpp_channelz PROPERTIES -- VERSION ${gRPC_CPP_VERSION} -- SOVERSION ${gRPC_CPP_SOVERSION} --) -- --if(WIN32 AND MSVC) ++set_target_properties(grpc_plugin_support PROPERTIES + VERSION ${gRPC_CPP_VERSION} + SOVERSION ${gRPC_CPP_SOVERSION} + ) + + if(WIN32 AND MSVC) - set_target_properties(grpcpp_channelz PROPERTIES COMPILE_PDB_NAME "grpcpp_channelz" -- COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" -- ) -- if(gRPC_INSTALL) ++ set_target_properties(grpc_plugin_support PROPERTIES COMPILE_PDB_NAME "grpc_plugin_support" + COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" + ) + if(gRPC_INSTALL) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpcpp_channelz.pdb -- DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL -- ) -- endif() --endif() -- ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_plugin_support.pdb + DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL + ) + endif() + endif() + -target_include_directories(grpcpp_channelz -- PUBLIC $ $ -- PRIVATE -- ${CMAKE_CURRENT_SOURCE_DIR} -- ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} -- ${_gRPC_RE2_INCLUDE_DIR} -- ${_gRPC_SSL_INCLUDE_DIR} -- ${_gRPC_UPB_GENERATED_DIR} -- ${_gRPC_UPB_GRPC_GENERATED_DIR} -- ${_gRPC_UPB_INCLUDE_DIR} -- ${_gRPC_XXHASH_INCLUDE_DIR} -- ${_gRPC_ZLIB_INCLUDE_DIR} -- ${_gRPC_PROTO_GENS_DIR} --) ++target_include_directories(grpc_plugin_support + PUBLIC $ $ + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} +@@ -5444,13 +3908,15 @@ target_include_directories(grpcpp_channelz + ${_gRPC_ZLIB_INCLUDE_DIR} + ${_gRPC_PROTO_GENS_DIR} + ) -target_link_libraries(grpcpp_channelz -- ${_gRPC_BASELIB_LIBRARIES} -- ${_gRPC_PROTOBUF_LIBRARIES} -- ${_gRPC_ZLIB_LIBRARIES} -- ${_gRPC_ALLTARGETS_LIBRARIES} ++target_link_libraries(grpc_plugin_support + ${_gRPC_ALLTARGETS_LIBRARIES} - grpc++ --) -- --foreach(_hdr ++ ${_gRPC_PROTOBUF_LIBRARIES} ++ ${_gRPC_PROTOBUF_PROTOC_LIBRARIES} + ) + + foreach(_hdr - include/grpcpp/ext/channelz_service_plugin.h --) -- string(REPLACE "include/" "" _path ${_hdr}) -- get_filename_component(_path ${_path} PATH) -- install(FILES ${_hdr} -- DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}" -- ) --endforeach() ++ include/grpc++/impl/codegen/config_protobuf.h ++ include/grpcpp/impl/codegen/config_protobuf.h + ) + string(REPLACE "include/" "" _path ${_hdr}) + get_filename_component(_path ${_path} PATH) +@@ -5458,14 +3924,10 @@ foreach(_hdr + DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}" + ) + endforeach() -endif() -- + -if(gRPC_BUILD_CODEGEN) -- + -# grpcpp_channelz doesn't build with protobuf-lite, so no install required -# See https://github.com/grpc/grpc/issues/22826 -if(gRPC_INSTALL AND NOT gRPC_USE_PROTO_LITE) - install(TARGETS grpcpp_channelz EXPORT gRPCTargets -- RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} -- BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} -- LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} -- ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} -- ) --endif() -- ++if(gRPC_INSTALL) ++ install(TARGETS grpc_plugin_support EXPORT gRPCTargets + RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} + BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} + LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} +@@ -5473,8 +3935,6 @@ if(gRPC_INSTALL AND NOT gRPC_USE_PROTO_LITE) + ) + endif() + -endif() - - add_library(upb - third_party/upb/third_party/utf8_range/naive.c - third_party/upb/third_party/utf8_range/range2-neon.c -@@ -25285,17 +23873,6 @@ - "-laddress_sorting -lupb" + if(gRPC_BUILD_TESTS) + if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) + +@@ -30384,40 +28844,18 @@ generate_pkgconfig( + "high performance general RPC framework" + "${gRPC_CORE_VERSION}" + "absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_cleanup absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_memory absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr" +- "libcares openssl re2 zlib utf8_range" ++ "libcares openssl re2 zlib utf8_range" + "-lgrpc" +- "-laddress_sorting -lupb" ++ "-laddress_sorting -lupb" "grpc.pc") -# grpc_unsecure .pc file @@ -1471,18 +2548,23 @@ - "gRPC unsecure" - "high performance general RPC framework without SSL" - "${gRPC_CORE_VERSION}" -- "gpr absl_any_invocable absl_base absl_bind_front absl_cleanup absl_cord absl_core_headers absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_memory absl_optional absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant" -- "re2 libcares zlib" +- "absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_cleanup absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_memory absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr" +- "libcares zlib utf8_range" - "-lgrpc_unsecure" -- "-laddress_sorting -lupb" +- "-laddress_sorting -lupb" - "grpc_unsecure.pc") - # grpc++ .pc file generate_pkgconfig( "gRPC++" -@@ -25306,14 +23883,3 @@ + "C++ wrapper for gRPC" + "${gRPC_CPP_VERSION}" + "absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_cleanup absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_memory absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr grpc" +- "libcares openssl re2 zlib utf8_range" ++ "libcares openssl re2 zlib utf8_range" "-lgrpc++" - "" +- "-laddress_sorting -lupb" ++ "-laddress_sorting -lupb" "grpc++.pc") - -# grpc++_unsecure .pc file @@ -1490,8 +2572,8 @@ - "gRPC++ unsecure" - "C++ wrapper for gRPC without SSL" - "${gRPC_CPP_VERSION}" -- "grpc_unsecure absl_any_invocable absl_base absl_bind_front absl_cleanup absl_cord absl_core_headers absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_memory absl_optional absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant" -- "" +- "absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_cleanup absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_memory absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr grpc_unsecure" +- "libcares zlib utf8_range" - "-lgrpc++_unsecure" -- "" +- "-laddress_sorting -lupb" - "grpc++_unsecure.pc") diff --git a/3rd-party/vcpkg-ports/grpc/snprintf.patch b/3rd-party/vcpkg-ports/grpc/snprintf.patch deleted file mode 100644 index b5012ad2db..0000000000 --- a/3rd-party/vcpkg-ports/grpc/snprintf.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/core/tsi/alts/crypt/aes_gcm.cc b/src/core/tsi/alts/crypt/aes_gcm.cc -index b761224..88a3d6b 100644 ---- a/src/core/tsi/alts/crypt/aes_gcm.cc -+++ b/src/core/tsi/alts/crypt/aes_gcm.cc -@@ -19,6 +19,7 @@ - #include - - #include -+#include - - #include - #include diff --git a/3rd-party/vcpkg-ports/grpc/vcpkg-cmake-wrapper.cmake b/3rd-party/vcpkg-ports/grpc/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000000..e3e8b10c8f --- /dev/null +++ b/3rd-party/vcpkg-ports/grpc/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,2 @@ +list(REMOVE_AT ARGS 0) +_find_package(gRPC ${ARGS}) # Shouldn't this be fixed downstream instead of using a Wrapper? diff --git a/3rd-party/vcpkg-ports/grpc/vcpkg.json b/3rd-party/vcpkg-ports/grpc/vcpkg.json index 437868cfc2..16184bded5 100644 --- a/3rd-party/vcpkg-ports/grpc/vcpkg.json +++ b/3rd-party/vcpkg-ports/grpc/vcpkg.json @@ -1,7 +1,8 @@ { "name": "grpc", - "version-semver": "1.52.1", - "description": "An RPC library and framework", + "version-semver": "1.60.0", + "port-version": 1, + "description": "gRPC is a modern, open source, high-performance remote procedure call (RPC) framework that can run anywhere. gRPC enables client and server applications to communicate transparently, and simplifies the building of connected systems.", "homepage": "https://github.com/grpc/grpc", "license": "Apache-2.0", "dependencies": [ @@ -17,12 +18,14 @@ "codegen" ] }, + "openssl", "protobuf", { "name": "protobuf", "host": true }, "re2", + "upb", { "name": "vcpkg-cmake", "host": true @@ -34,11 +37,9 @@ "zlib" ], "features": { - "absl-sync": { - "description": "Deprecated." - }, "codegen": { - "description": "Build code generator machinery" + "description": "Build code generator machinery", + "supports": "!uwp" } } } diff --git a/src/client/common/client_common.cpp b/src/client/common/client_common.cpp index 2472e39528..55ce118497 100644 --- a/src/client/common/client_common.cpp +++ b/src/client/common/client_common.cpp @@ -137,7 +137,11 @@ void mp::client::register_global_settings_handlers() std::shared_ptr mp::client::make_channel(const std::string& server_address, const mp::CertProvider& cert_provider) { - return grpc::CreateChannel(server_address, grpc::SslCredentials(get_ssl_credentials_opts_from(cert_provider))); + grpc::ChannelArguments channel_args; + channel_args.SetString(GRPC_ARG_DEFAULT_AUTHORITY, "localhost"); + return grpc::CreateCustomChannel(server_address, + grpc::SslCredentials(get_ssl_credentials_opts_from(cert_provider)), + channel_args); } std::string mp::client::get_server_address() diff --git a/tests/unix/test_daemon_rpc.cpp b/tests/unix/test_daemon_rpc.cpp index 77e66a7420..39ee6ed6fb 100644 --- a/tests/unix/test_daemon_rpc.cpp +++ b/tests/unix/test_daemon_rpc.cpp @@ -66,9 +66,9 @@ struct TestDaemonRpc : public mpt::DaemonTestFixture opts.pem_cert_chain = mpt::client_cert; opts.pem_private_key = mpt::client_key; - auto channel = grpc::CreateChannel(server_address, grpc::SslCredentials(opts)); - - return mp::Rpc::Stub(channel); + grpc::ChannelArguments channel_args; + channel_args.SetString(GRPC_ARG_DEFAULT_AUTHORITY, "localhost"); + return mp::Rpc::Stub(grpc::CreateCustomChannel(server_address, grpc::SslCredentials(opts), channel_args)); } mpt::MockDaemon make_secure_server() diff --git a/vcpkg.json b/vcpkg.json index 4953cbcb95..3858504eb6 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,5 +1,5 @@ { - "builtin-baseline": "ca7b1b15f548c25c766360593a2c732d56ed0133", + "builtin-baseline": "c82f74667287d3dc386bce81e44964370c91a289", "dependencies": [ "poco", "grpc"