mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-26 17:41:09 +08:00
[grpc] Update to 1.50.1 (#27536)
* grpc: Update to 1.50.1 * dos2unix Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
parent
47ef7c0682
commit
b39520920f
@ -1,47 +1,47 @@
|
||||
diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.cc b/src/core/ext/transport/chttp2/transport/hpack_parser.cc
|
||||
index cb17759bba..a3c3598430 100644
|
||||
--- a/src/core/ext/transport/chttp2/transport/hpack_parser.cc
|
||||
+++ b/src/core/ext/transport/chttp2/transport/hpack_parser.cc
|
||||
@@ -1032,7 +1032,7 @@ class HPackParser::Parser {
|
||||
|
||||
private:
|
||||
void GPR_ATTRIBUTE_NOINLINE LogHeader(const HPackTable::Memento& memento) {
|
||||
- const char* type;
|
||||
+ const char* type = nullptr;
|
||||
switch (log_info_.type) {
|
||||
case LogInfo::kHeaders:
|
||||
type = "HDR";
|
||||
diff --git a/src/core/lib/slice/slice.cc b/src/core/lib/slice/slice.cc
|
||||
index 2e78b4de9e..77e88cab70 100644
|
||||
--- a/src/core/lib/slice/slice.cc
|
||||
+++ b/src/core/lib/slice/slice.cc
|
||||
@@ -181,6 +181,7 @@ grpc_slice grpc_slice_from_moved_buffer(grpc_core::UniquePtr<char> p,
|
||||
size_t len) {
|
||||
uint8_t* ptr = reinterpret_cast<uint8_t*>(p.get());
|
||||
grpc_slice slice;
|
||||
+ memset(&slice, 0, sizeof(grpc_slice));
|
||||
if (len <= sizeof(slice.data.inlined.bytes)) {
|
||||
slice.refcount = nullptr;
|
||||
slice.data.inlined.length = len;
|
||||
@@ -199,7 +200,7 @@ grpc_slice grpc_slice_from_moved_string(grpc_core::UniquePtr<char> p) {
|
||||
}
|
||||
|
||||
grpc_slice grpc_slice_from_cpp_string(std::string str) {
|
||||
- grpc_slice slice;
|
||||
+ grpc_slice slice = { 0 };
|
||||
if (str.size() <= sizeof(slice.data.inlined.bytes)) {
|
||||
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 4c0220837e..bb5a367107 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) {
|
||||
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Server Shutdown"));
|
||||
return GRPC_CALL_OK;
|
||||
}
|
||||
- RequestMatcherInterface* rm;
|
||||
+ RequestMatcherInterface* rm = nullptr;
|
||||
switch (rc->type) {
|
||||
case RequestedCall::Type::BATCH_CALL:
|
||||
rm = unregistered_request_matcher_.get();
|
||||
diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.cc b/src/core/ext/transport/chttp2/transport/hpack_parser.cc
|
||||
index cb17759bba..a3c3598430 100644
|
||||
--- a/src/core/ext/transport/chttp2/transport/hpack_parser.cc
|
||||
+++ b/src/core/ext/transport/chttp2/transport/hpack_parser.cc
|
||||
@@ -1032,7 +1032,7 @@ class HPackParser::Parser {
|
||||
|
||||
private:
|
||||
void GPR_ATTRIBUTE_NOINLINE LogHeader(const HPackTable::Memento& memento) {
|
||||
- const char* type;
|
||||
+ const char* type = nullptr;
|
||||
switch (log_info_.type) {
|
||||
case LogInfo::kHeaders:
|
||||
type = "HDR";
|
||||
diff --git a/src/core/lib/slice/slice.cc b/src/core/lib/slice/slice.cc
|
||||
index 2e78b4de9e..77e88cab70 100644
|
||||
--- a/src/core/lib/slice/slice.cc
|
||||
+++ b/src/core/lib/slice/slice.cc
|
||||
@@ -181,6 +181,7 @@ grpc_slice grpc_slice_from_moved_buffer(grpc_core::UniquePtr<char> p,
|
||||
size_t len) {
|
||||
uint8_t* ptr = reinterpret_cast<uint8_t*>(p.get());
|
||||
grpc_slice slice;
|
||||
+ memset(&slice, 0, sizeof(grpc_slice));
|
||||
if (len <= sizeof(slice.data.inlined.bytes)) {
|
||||
slice.refcount = nullptr;
|
||||
slice.data.inlined.length = len;
|
||||
@@ -199,7 +200,7 @@ grpc_slice grpc_slice_from_moved_string(grpc_core::UniquePtr<char> p) {
|
||||
}
|
||||
|
||||
grpc_slice grpc_slice_from_cpp_string(std::string str) {
|
||||
- grpc_slice slice;
|
||||
+ grpc_slice slice = { 0 };
|
||||
if (str.size() <= sizeof(slice.data.inlined.bytes)) {
|
||||
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 4c0220837e..bb5a367107 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) {
|
||||
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Server Shutdown"));
|
||||
return GRPC_CALL_OK;
|
||||
}
|
||||
- RequestMatcherInterface* rm;
|
||||
+ RequestMatcherInterface* rm = nullptr;
|
||||
switch (rc->type) {
|
||||
case RequestedCall::Type::BATCH_CALL:
|
||||
rm = unregistered_request_matcher_.get();
|
||||
|
@ -1,91 +1,91 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 8498b6e435..12d50a26ff 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -85,6 +85,9 @@ set_property(CACHE gRPC_SSL_PROVIDER PROPERTY STRINGS "module" "package")
|
||||
set(gRPC_PROTOBUF_PROVIDER "module" CACHE STRING "Provider of protobuf library")
|
||||
set_property(CACHE gRPC_PROTOBUF_PROVIDER PROPERTY STRINGS "module" "package")
|
||||
|
||||
+set(gRPC_UPB_PROVIDER "module" CACHE STRING "Provider of upb library")
|
||||
+set_property(CACHE gRPC_UPB_PROVIDER PROPERTY STRINGS "module" "package")
|
||||
+
|
||||
set(gRPC_PROTOBUF_PACKAGE_TYPE "" CACHE STRING "Algorithm for searching protobuf package")
|
||||
set_property(CACHE gRPC_PROTOBUF_PACKAGE_TYPE PROPERTY STRINGS "CONFIG" "MODULE")
|
||||
|
||||
@@ -1596,6 +1599,7 @@ target_link_libraries(gpr
|
||||
absl::time
|
||||
absl::optional
|
||||
absl::variant
|
||||
+ ${_gRPC_UPB_LIBRARIES}
|
||||
)
|
||||
if(_gRPC_PLATFORM_ANDROID)
|
||||
target_link_libraries(gpr
|
||||
@@ -2400,7 +2404,6 @@ target_link_libraries(grpc
|
||||
gpr
|
||||
${_gRPC_SSL_LIBRARIES}
|
||||
address_sorting
|
||||
- upb
|
||||
)
|
||||
if(_gRPC_PLATFORM_IOS OR _gRPC_PLATFORM_MAC)
|
||||
target_link_libraries(grpc "-framework CoreFoundation")
|
||||
@@ -2961,7 +2964,6 @@ target_link_libraries(grpc_unsecure
|
||||
absl::utility
|
||||
gpr
|
||||
address_sorting
|
||||
- upb
|
||||
)
|
||||
if(_gRPC_PLATFORM_IOS OR _gRPC_PLATFORM_MAC)
|
||||
target_link_libraries(grpc_unsecure "-framework CoreFoundation")
|
||||
@@ -4254,6 +4256,7 @@ endif()
|
||||
|
||||
endif()
|
||||
|
||||
+if (gRPC_UPB_PROVIDER STREQUAL "module")
|
||||
add_library(upb
|
||||
third_party/upb/third_party/utf8_range/naive.c
|
||||
third_party/upb/third_party/utf8_range/range2-neon.c
|
||||
@@ -4322,7 +4325,7 @@ if(gRPC_INSTALL)
|
||||
ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
|
||||
)
|
||||
endif()
|
||||
-
|
||||
+endif()
|
||||
|
||||
|
||||
add_executable(gen_hpack_tables
|
||||
diff --git a/cmake/gRPCConfig.cmake.in b/cmake/gRPCConfig.cmake.in
|
||||
index 3623f4aa5e..df6ced560e 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 f2a0e508c3..09751f5ef0 100644
|
||||
--- a/cmake/upb.cmake
|
||||
+++ b/cmake/upb.cmake
|
||||
@@ -12,9 +12,19 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
+set(_gRPC_UPB_GRPC_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-generated" "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upbdefs-generated")
|
||||
+if (gRPC_UPB_PROVIDER STREQUAL "module")
|
||||
+
|
||||
set(UPB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/upb)
|
||||
|
||||
set(_gRPC_UPB_INCLUDE_DIR "${UPB_ROOT_DIR}")
|
||||
set(_gRPC_UPB_GRPC_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-generated" "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upbdefs-generated")
|
||||
|
||||
set(_gRPC_UPB_LIBRARIES upb)
|
||||
+
|
||||
+elseif(gRPC_UPB_PROVIDER STREQUAL "package")
|
||||
+ find_package(upb CONFIG REQUIRED)
|
||||
+ set(_gRPC_UPB_LIBRARIES upb::fastdecode upb::json upb::upb upb::utf8_range upb::textformat upb::reflection upb::descriptor_upb_proto)
|
||||
+ set(_gRPC_UPB_INCLUDE_DIR)
|
||||
+ set(_gRPC_FIND_UPB "if(NOT upb_FOUND)\n find_package(upb CONFIG REQUIRED)\nendif()")
|
||||
+endif()
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 23098aa578..a8e8bc274b 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -85,6 +85,9 @@ set_property(CACHE gRPC_SSL_PROVIDER PROPERTY STRINGS "module" "package")
|
||||
set(gRPC_PROTOBUF_PROVIDER "module" CACHE STRING "Provider of protobuf library")
|
||||
set_property(CACHE gRPC_PROTOBUF_PROVIDER PROPERTY STRINGS "module" "package")
|
||||
|
||||
+set(gRPC_UPB_PROVIDER "module" CACHE STRING "Provider of upb library")
|
||||
+set_property(CACHE gRPC_UPB_PROVIDER PROPERTY STRINGS "module" "package")
|
||||
+
|
||||
set(gRPC_PROTOBUF_PACKAGE_TYPE "" CACHE STRING "Algorithm for searching protobuf package")
|
||||
set_property(CACHE gRPC_PROTOBUF_PACKAGE_TYPE PROPERTY STRINGS "CONFIG" "MODULE")
|
||||
|
||||
@@ -1631,6 +1634,7 @@ target_link_libraries(gpr
|
||||
absl::time
|
||||
absl::optional
|
||||
absl::variant
|
||||
+ ${_gRPC_UPB_LIBRARIES}
|
||||
)
|
||||
if(_gRPC_PLATFORM_ANDROID)
|
||||
target_link_libraries(gpr
|
||||
@@ -2435,7 +2439,6 @@ target_link_libraries(grpc
|
||||
gpr
|
||||
${_gRPC_SSL_LIBRARIES}
|
||||
address_sorting
|
||||
- upb
|
||||
)
|
||||
if(_gRPC_PLATFORM_IOS OR _gRPC_PLATFORM_MAC)
|
||||
target_link_libraries(grpc "-framework CoreFoundation")
|
||||
@@ -2979,7 +2982,6 @@ target_link_libraries(grpc_unsecure
|
||||
absl::utility
|
||||
gpr
|
||||
address_sorting
|
||||
- upb
|
||||
)
|
||||
if(_gRPC_PLATFORM_IOS OR _gRPC_PLATFORM_MAC)
|
||||
target_link_libraries(grpc_unsecure "-framework CoreFoundation")
|
||||
@@ -4251,6 +4253,7 @@ endif()
|
||||
|
||||
endif()
|
||||
|
||||
+if (gRPC_UPB_PROVIDER STREQUAL "module")
|
||||
add_library(upb
|
||||
third_party/upb/third_party/utf8_range/naive.c
|
||||
third_party/upb/third_party/utf8_range/range2-neon.c
|
||||
@@ -4319,7 +4322,7 @@ if(gRPC_INSTALL)
|
||||
ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
|
||||
)
|
||||
endif()
|
||||
-
|
||||
+endif()
|
||||
|
||||
if(gRPC_BUILD_TESTS)
|
||||
|
||||
diff --git a/cmake/gRPCConfig.cmake.in b/cmake/gRPCConfig.cmake.in
|
||||
index 3623f4aa5e..df6ced560e 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 f2a0e508c3..09751f5ef0 100644
|
||||
--- a/cmake/upb.cmake
|
||||
+++ b/cmake/upb.cmake
|
||||
@@ -12,9 +12,19 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
+set(_gRPC_UPB_GRPC_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-generated" "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upbdefs-generated")
|
||||
+if (gRPC_UPB_PROVIDER STREQUAL "module")
|
||||
+
|
||||
set(UPB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/upb)
|
||||
|
||||
set(_gRPC_UPB_INCLUDE_DIR "${UPB_ROOT_DIR}")
|
||||
set(_gRPC_UPB_GRPC_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-generated" "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upbdefs-generated")
|
||||
|
||||
set(_gRPC_UPB_LIBRARIES upb)
|
||||
+
|
||||
+elseif(gRPC_UPB_PROVIDER STREQUAL "package")
|
||||
+ find_package(upb CONFIG REQUIRED)
|
||||
+ set(_gRPC_UPB_LIBRARIES upb::fastdecode upb::json upb::upb upb::utf8_range upb::textformat upb::reflection upb::descriptor_upb_proto)
|
||||
+ set(_gRPC_UPB_INCLUDE_DIR)
|
||||
+ set(_gRPC_FIND_UPB "if(NOT upb_FOUND)\n find_package(upb CONFIG REQUIRED)\nendif()")
|
||||
+endif()
|
||||
|
@ -1,16 +1,16 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 25990a5d8a..ba8df92858 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -326,6 +326,11 @@ include(cmake/xxhash.cmake)
|
||||
include(cmake/zlib.cmake)
|
||||
include(cmake/download_archive.cmake)
|
||||
|
||||
+if (ABSL_USE_CXX17)
|
||||
+ message(STATUS "Found absl uses CXX17, enable CXX17 feature.")
|
||||
+ set(CMAKE_CXX_STANDARD 17)
|
||||
+endif()
|
||||
+
|
||||
# Setup external proto library at third_party/envoy-api with 2 download URLs
|
||||
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/envoy-api)
|
||||
# Download the archive via HTTP, validate the checksum, and extract to third_party/envoy-api.
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 25990a5d8a..ba8df92858 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -326,6 +326,11 @@ include(cmake/xxhash.cmake)
|
||||
include(cmake/zlib.cmake)
|
||||
include(cmake/download_archive.cmake)
|
||||
|
||||
+if (ABSL_USE_CXX17)
|
||||
+ message(STATUS "Found absl uses CXX17, enable CXX17 feature.")
|
||||
+ set(CMAKE_CXX_STANDARD 17)
|
||||
+endif()
|
||||
+
|
||||
# Setup external proto library at third_party/envoy-api with 2 download URLs
|
||||
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/envoy-api)
|
||||
# Download the archive via HTTP, validate the checksum, and extract to third_party/envoy-api.
|
||||
|
@ -1,10 +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()
|
||||
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()
|
||||
|
@ -5,8 +5,8 @@ endif()
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO grpc/grpc
|
||||
REF v1.49.0
|
||||
SHA512 592413f0f907ec5c7c6b22366e418c589a653ef105b61bf0f98fc64dc40ccea0d2fadc9af9ade62bffa99cafec6e1305300cb9531202923614fe308b7f831210
|
||||
REF v1.50.1
|
||||
SHA512 7c90ec9fd073980218f69eda704dbfb526dbd2f7f864135bdc6bd064789d1d8889127a253493196e617b0b90dddf1204ca9344c5e585ab0f0ca5c2a2a0a22ef1
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
00001-fix-uwp.patch
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "grpc",
|
||||
"version-semver": "1.49.0",
|
||||
"version-semver": "1.50.1",
|
||||
"description": "An RPC library and framework",
|
||||
"homepage": "https://github.com/grpc/grpc",
|
||||
"license": "Apache-2.0",
|
||||
|
@ -2761,7 +2761,7 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"grpc": {
|
||||
"baseline": "1.49.0",
|
||||
"baseline": "1.50.1",
|
||||
"port-version": 0
|
||||
},
|
||||
"grppi": {
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "13420572b45b2b5a5a3fb41eb383d0c62f1d7c51",
|
||||
"version-semver": "1.50.1",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "28334108999e49da12dbde24bcfc183984ecef41",
|
||||
"version-semver": "1.49.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user