-
Notifications
You must be signed in to change notification settings - Fork 654
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
[3rd-party] added vcpkg and grpc update
1 parent
183583d
commit 1766a7b
Showing
16 changed files
with
332 additions
and
1,561 deletions.
There are no files selected for viewing
Submodule vcpkg
updated
7042 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
10 changes: 5 additions & 5 deletions
10
3rd-party/vcpkg-ports/grpc/00004-link-gdi32-on-windows.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1,497 changes: 0 additions & 1,497 deletions
1,497
3rd-party/vcpkg-ports/grpc/00006-remove-unused-libraries.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
3rd-party/vcpkg-ports/grpc/00015-disable-download-archive.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <grpc/impl/channel_arg_names.h> | ||
#include <grpc/support/alloc.h> | ||
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 <grpc/support/log.h> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
list(REMOVE_AT ARGS 0) | ||
_find_package(gRPC ${ARGS}) # Shouldn't this be fixed downstream instead of using a Wrapper? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters