mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 11:33:03 +08:00
[grpc] Update grpc to 1.24.3 (#9135)
* [grpc] Update grpc to 1.24.0 * [grpc] Update grpc to 1.24.3 * Disable error C4146 on uwp C4146: unary minus operator applied to unsigned type, result still unsigned
This commit is contained in:
parent
97485dc036
commit
e510f8708e
@ -1,5 +1,5 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 48a0261825..2ba7077c4b 100644
|
||||
index e49b3cc07d..74bbd3294f 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -92,6 +92,9 @@ if(UNIX)
|
||||
@ -12,7 +12,7 @@ index 48a0261825..2ba7077c4b 100644
|
||||
endif()
|
||||
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
||||
@@ -109,6 +112,9 @@ if (MSVC)
|
||||
@@ -107,6 +110,9 @@ if (MSVC)
|
||||
add_definitions(/wd4267)
|
||||
# TODO(jtattermusch): needed to build boringssl with VS2017, revisit later
|
||||
add_definitions(/wd4987 /wd4774 /wd4819 /wd4996 /wd4619)
|
||||
@ -22,7 +22,7 @@ index 48a0261825..2ba7077c4b 100644
|
||||
endif()
|
||||
|
||||
if (gRPC_USE_PROTO_LITE)
|
||||
@@ -179,6 +185,10 @@ file(MAKE_DIRECTORY ${_gRPC_PROTO_GENS_DIR})
|
||||
@@ -172,6 +178,10 @@ file(MAKE_DIRECTORY ${_gRPC_PROTO_GENS_DIR})
|
||||
# ``.proto`` files
|
||||
#
|
||||
function(protobuf_generate_grpc_cpp)
|
||||
@ -33,7 +33,7 @@ index 48a0261825..2ba7077c4b 100644
|
||||
if(NOT ARGN)
|
||||
message(SEND_ERROR "Error: PROTOBUF_GENERATE_GRPC_CPP() called without any proto files")
|
||||
return()
|
||||
@@ -220,6 +230,7 @@ function(protobuf_generate_grpc_cpp)
|
||||
@@ -213,6 +223,7 @@ function(protobuf_generate_grpc_cpp)
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
@ -41,7 +41,7 @@ index 48a0261825..2ba7077c4b 100644
|
||||
add_custom_target(plugins
|
||||
DEPENDS
|
||||
grpc_cpp_plugin
|
||||
@@ -249,6 +260,8 @@ add_custom_target(tools_cxx
|
||||
@@ -242,6 +253,8 @@ add_custom_target(tools_cxx
|
||||
add_custom_target(tools
|
||||
DEPENDS tools_c tools_cxx)
|
||||
|
||||
@ -50,7 +50,7 @@ index 48a0261825..2ba7077c4b 100644
|
||||
if (gRPC_BUILD_TESTS)
|
||||
add_custom_target(buildtests_c)
|
||||
add_dependencies(buildtests_c algorithm_test)
|
||||
@@ -3532,7 +3545,6 @@ foreach(_hdr
|
||||
@@ -3622,7 +3635,6 @@ foreach(_hdr
|
||||
DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
|
||||
)
|
||||
endforeach()
|
||||
@ -58,7 +58,7 @@ index 48a0261825..2ba7077c4b 100644
|
||||
|
||||
if (gRPC_BUILD_CODEGEN)
|
||||
|
||||
@@ -3543,6 +3555,7 @@ if (gRPC_INSTALL)
|
||||
@@ -3633,6 +3645,7 @@ if (gRPC_INSTALL)
|
||||
ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
|
||||
)
|
||||
endif()
|
||||
@ -66,7 +66,7 @@ index 48a0261825..2ba7077c4b 100644
|
||||
|
||||
endif (gRPC_BUILD_CODEGEN)
|
||||
if (gRPC_BUILD_TESTS)
|
||||
@@ -3666,7 +3679,6 @@ foreach(_hdr
|
||||
@@ -3760,7 +3773,6 @@ foreach(_hdr
|
||||
DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
|
||||
)
|
||||
endforeach()
|
||||
@ -74,7 +74,7 @@ index 48a0261825..2ba7077c4b 100644
|
||||
|
||||
if (gRPC_BUILD_CODEGEN)
|
||||
|
||||
@@ -3677,6 +3689,7 @@ if (gRPC_INSTALL)
|
||||
@@ -3771,6 +3783,7 @@ if (gRPC_INSTALL)
|
||||
ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
|
||||
)
|
||||
endif()
|
||||
@ -82,7 +82,7 @@ index 48a0261825..2ba7077c4b 100644
|
||||
|
||||
endif (gRPC_BUILD_CODEGEN)
|
||||
if (gRPC_BUILD_TESTS)
|
||||
@@ -4729,7 +4742,7 @@ foreach(_hdr
|
||||
@@ -4845,7 +4858,7 @@ foreach(_hdr
|
||||
DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
|
||||
)
|
||||
endforeach()
|
||||
@ -91,7 +91,7 @@ index 48a0261825..2ba7077c4b 100644
|
||||
|
||||
if (gRPC_BUILD_CODEGEN)
|
||||
|
||||
@@ -4740,6 +4753,7 @@ if (gRPC_INSTALL)
|
||||
@@ -4856,6 +4869,7 @@ if (gRPC_INSTALL)
|
||||
ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
|
||||
)
|
||||
endif()
|
||||
|
@ -1,10 +1,10 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 3839e22..91720a9 100644
|
||||
index 74bbd3294f..f6c4a340fc 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -99,6 +99,11 @@ set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
||||
@@ -99,6 +99,11 @@ endif()
|
||||
|
||||
add_definitions(-DPB_FIELD_32BIT)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
||||
|
||||
+if (gRPC_STATIC_LINKING AND NOT _gRPC_PLATFORM_WINDOWS)
|
||||
+ # Force to static link
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e820737201..3eb4795660 100644
|
||||
index f6c4a340fc..22054eedd0 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -158,7 +158,7 @@ elseif(UNIX)
|
||||
@@ -164,7 +164,7 @@ elseif(UNIX)
|
||||
endif()
|
||||
|
||||
if(WIN32 AND MSVC)
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git a/src/core/lib/slice/slice.cc b/src/core/lib/slice/slice.cc
|
||||
index eebf66b..6c6ee50 100644
|
||||
index d3480abaa8..b3e63b2433 100644
|
||||
--- a/src/core/lib/slice/slice.cc
|
||||
+++ b/src/core/lib/slice/slice.cc
|
||||
@@ -220,6 +220,7 @@ grpc_slice grpc_slice_from_moved_buffer(grpc_core::UniquePtr<char> p,
|
||||
@@ -226,6 +226,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;
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b3ca615..21b5aaf 100644
|
||||
index 22054eedd0..a7fdb1fcd5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -171,7 +171,7 @@ elseif(UNIX)
|
||||
@@ -164,7 +164,7 @@ elseif(UNIX)
|
||||
endif()
|
||||
|
||||
if(WIN32 AND MSVC)
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 1961995..d721654 100644
|
||||
index a7fdb1fcd5..ae3bf61daf 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -4692,7 +4692,7 @@ if (gRPC_INSTALL)
|
||||
@@ -4806,7 +4806,7 @@ if (gRPC_INSTALL)
|
||||
endif()
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ index 1961995..d721654 100644
|
||||
add_library(grpcpp_channelz
|
||||
src/cpp/server/channelz/channelz_service.cc
|
||||
src/cpp/server/channelz/channelz_service_plugin.cc
|
||||
@@ -4749,7 +4749,7 @@ foreach(_hdr
|
||||
@@ -4865,7 +4865,7 @@ foreach(_hdr
|
||||
endforeach()
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ index 1961995..d721654 100644
|
||||
|
||||
if (gRPC_INSTALL)
|
||||
install(TARGETS grpcpp_channelz EXPORT gRPCTargets
|
||||
@@ -4758,9 +4758,9 @@ if (gRPC_INSTALL)
|
||||
@@ -4874,9 +4874,9 @@ if (gRPC_INSTALL)
|
||||
ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
|
||||
)
|
||||
endif()
|
||||
|
@ -1,66 +0,0 @@
|
||||
diff --git a/src/core/lib/gpr/log_linux.cc b/src/core/lib/gpr/log_linux.cc
|
||||
index 561276f..1fef59b 100644
|
||||
--- a/src/core/lib/gpr/log_linux.cc
|
||||
+++ b/src/core/lib/gpr/log_linux.cc
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
-static long gettid(void) { return syscall(__NR_gettid); }
|
||||
+static long _intl_gettid(void) { return syscall(__NR_gettid); }
|
||||
|
||||
void gpr_log(const char* file, int line, gpr_log_severity severity,
|
||||
const char* format, ...) {
|
||||
@@ -70,7 +70,7 @@ void gpr_default_log(gpr_log_func_args* args) {
|
||||
gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME);
|
||||
struct tm tm;
|
||||
static __thread long tid = 0;
|
||||
- if (tid == 0) tid = gettid();
|
||||
+ if (tid == 0) tid = _intl_gettid();
|
||||
|
||||
timer = static_cast<time_t>(now.tv_sec);
|
||||
final_slash = strrchr(args->file, '/');
|
||||
diff --git a/src/core/lib/gpr/log_posix.cc b/src/core/lib/gpr/log_posix.cc
|
||||
index b6edc14..4bd42fd 100644
|
||||
--- a/src/core/lib/gpr/log_posix.cc
|
||||
+++ b/src/core/lib/gpr/log_posix.cc
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
-static intptr_t gettid(void) { return (intptr_t)pthread_self(); }
|
||||
+static intptr_t _intl_gettid(void) { return (intptr_t)pthread_self(); }
|
||||
|
||||
void gpr_log(const char* file, int line, gpr_log_severity severity,
|
||||
const char* format, ...) {
|
||||
@@ -86,7 +86,7 @@ void gpr_default_log(gpr_log_func_args* args) {
|
||||
char* prefix;
|
||||
gpr_asprintf(&prefix, "%s%s.%09d %7" PRIdPTR " %s:%d]",
|
||||
gpr_log_severity_string(args->severity), time_buffer,
|
||||
- (int)(now.tv_nsec), gettid(), display_file, args->line);
|
||||
+ (int)(now.tv_nsec), _intl_gettid(), display_file, args->line);
|
||||
|
||||
fprintf(stderr, "%-70s %s\n", prefix, args->message);
|
||||
gpr_free(prefix);
|
||||
diff --git a/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc
|
||||
index 08116b3..d48fd8d 100644
|
||||
--- a/src/core/lib/iomgr/ev_epollex_linux.cc
|
||||
+++ b/src/core/lib/iomgr/ev_epollex_linux.cc
|
||||
@@ -1102,7 +1102,7 @@ static void end_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
-static long gettid(void) { return syscall(__NR_gettid); }
|
||||
+static long _intl_gettid(void) { return syscall(__NR_gettid); }
|
||||
#endif
|
||||
|
||||
/* pollset->mu lock must be held by the caller before calling this.
|
||||
@@ -1122,7 +1122,7 @@ static grpc_error* pollset_work(grpc_pollset* pollset,
|
||||
#define WORKER_PTR (&worker)
|
||||
#endif
|
||||
#ifndef NDEBUG
|
||||
- WORKER_PTR->originator = gettid();
|
||||
+ WORKER_PTR->originator = _intl_gettid();
|
||||
#endif
|
||||
if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) {
|
||||
gpr_log(GPR_INFO,
|
31
ports/grpc/00008-uwp_upb_disable_C4146_error.patch
Normal file
31
ports/grpc/00008-uwp_upb_disable_C4146_error.patch
Normal file
@ -0,0 +1,31 @@
|
||||
diff --git a/third_party/upb/upb/msg.c b/third_party/upb/upb/msg.c
|
||||
index a77da5665c..399e8753ba 100644
|
||||
--- a/third_party/upb/upb/msg.c
|
||||
+++ b/third_party/upb/upb/msg.c
|
||||
@@ -33,17 +33,26 @@ static size_t upb_msg_sizeof(const upb_msglayout *l) {
|
||||
}
|
||||
|
||||
static upb_msg_internal *upb_msg_getinternal(upb_msg *msg) {
|
||||
+#pragma warning(push)
|
||||
+#pragma warning(disable : 4146)
|
||||
return VOIDPTR_AT(msg, -sizeof(upb_msg_internal));
|
||||
+#pragma warning(pop)
|
||||
}
|
||||
|
||||
static const upb_msg_internal *upb_msg_getinternal_const(const upb_msg *msg) {
|
||||
+#pragma warning(push)
|
||||
+#pragma warning(disable : 4146)
|
||||
return VOIDPTR_AT(msg, -sizeof(upb_msg_internal));
|
||||
+#pragma warning(pop)
|
||||
}
|
||||
|
||||
static upb_msg_internal_withext *upb_msg_getinternalwithext(
|
||||
upb_msg *msg, const upb_msglayout *l) {
|
||||
UPB_ASSERT(l->extendable);
|
||||
+#pragma warning(push)
|
||||
+#pragma warning(disable : 4146)
|
||||
return VOIDPTR_AT(msg, -sizeof(upb_msg_internal_withext));
|
||||
+#pragma warning(pop)
|
||||
}
|
||||
|
||||
upb_msg *upb_msg_new(const upb_msglayout *l, upb_arena *a) {
|
@ -1,5 +1,5 @@
|
||||
Source: grpc
|
||||
Version: 1.23.1-1
|
||||
Version: 1.24.3
|
||||
Build-Depends: zlib, openssl, protobuf, c-ares (!uwp)
|
||||
Homepage: https://github.com/grpc/grpc
|
||||
Description: An RPC library and framework
|
||||
|
@ -13,8 +13,8 @@ endif()
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO grpc/grpc
|
||||
REF v1.23.1
|
||||
SHA512 c39a07554645402c36cb79eddfda7165dc26ce5f7f09cae7ee6f7bedcc2aca8873117ea401d40ce2e3246e3e5888bcce12d4746cba7ed75068ff145046754981
|
||||
REF v1.24.3
|
||||
SHA512 19afa8b1fd64c429317c85d8cf42d01af0ac6aec82508740c176e1fd4f92dea9531ea9812523215ed67466bae93a75e14dc34cd9cce5987a13c0104e0313c69c
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
00001-fix-uwp.patch
|
||||
@ -24,7 +24,7 @@ vcpkg_from_github(
|
||||
00005-fix-uwp-error.patch
|
||||
00006-crypt32.patch
|
||||
00007-disable_grpcpp_channelz.patch
|
||||
00008-fix-duplicate-gettid.patch
|
||||
00008-uwp_upb_disable_C4146_error.patch
|
||||
)
|
||||
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
||||
|
Loading…
Reference in New Issue
Block a user