-
Notifications
You must be signed in to change notification settings - Fork 651
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3215 from canonical/use-vcpkg-to-build-modules
[build] Use vcpkg to build modules
- Loading branch information
Showing
32 changed files
with
2,466 additions
and
80 deletions.
There are no files selected for viewing
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
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
Submodule poco
deleted from
121161
16 changes: 16 additions & 0 deletions
16
3rd-party/vcpkg-ports/grpc/00002-static-linking-in-linux.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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 8f78306f77..e09f8fcc1e 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -211,6 +211,11 @@ if (NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE) | ||
endif() | ||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") | ||
|
||
+if (gRPC_STATIC_LINKING AND NOT _gRPC_PLATFORM_WINDOWS) | ||
+ # Force to static link | ||
+ set(CMAKE_EXE_LINKER_FLAGS "-Bstatic") | ||
+endif() | ||
+ | ||
if(MSVC) | ||
include(cmake/msvc_static_runtime.cmake) | ||
add_definitions(-D_WIN32_WINNT=0x600 -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS) |
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,13 @@ | ||
diff --git a/src/core/lib/transport/transport.cc b/src/core/lib/transport/transport.cc | ||
index 5d74ec2..89494b5 100644 | ||
--- a/src/core/lib/transport/transport.cc | ||
+++ b/src/core/lib/transport/transport.cc | ||
@@ -77,6 +77,8 @@ void grpc_stream_ref_init(grpc_stream_refcount* refcount, int /*initial_refs*/, | ||
: nullptr); | ||
} | ||
|
||
+#undef move64 | ||
+ | ||
static void move64bits(uint64_t* from, uint64_t* to) { | ||
*to += *from; | ||
*from = 0; |
13 changes: 13 additions & 0 deletions
13
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 25990a5d8a..8a632d2289 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -404,7 +404,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) | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +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 b0d3a6465b..5c48f1aa30 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 { | ||
|
||
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 898a62823c..6b31cdc082 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<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; | ||
@@ -206,7 +207,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 141b16e345..89d9d6dafd 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) { | ||
FailCall(cq_idx, rc, GRPC_ERROR_CREATE("Server Shutdown")); | ||
return GRPC_CALL_OK; | ||
} | ||
- RequestMatcherInterface* rm; | ||
+ RequestMatcherInterface* rm = nullptr; | ||
switch (rc->type) { | ||
case RequestedCall::Type::BATCH_CALL: | ||
rm = unregistered_request_matcher_.get(); |
Oops, something went wrong.