forked from conda-forge/grpc-cpp-feedstock
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure that zlib & abseil are linked privately
take status of patches for 1.46.x from conda-forge#213
- Loading branch information
1 parent
0761e97
commit 0df1806
Showing
4 changed files
with
875 additions
and
0 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
113 changes: 113 additions & 0 deletions
113
recipe/patches-grpc/0001-mark-linkage-of-c-ares-openssl-re2-zlib-as-private.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,113 @@ | ||
From bea431a8728ddd3a02337caee5765298bb9cf00b Mon Sep 17 00:00:00 2001 | ||
From: "H. Vetinari" <[email protected]> | ||
Date: Tue, 23 Aug 2022 11:45:20 +0200 | ||
Subject: [PATCH 1/3] mark linkage of c-ares/openssl/re2/zlib as private | ||
|
||
Co-Authored-By: Mark Harfouche <[email protected]> | ||
--- | ||
CMakeLists.txt | 78 ++++++++++++++++++++++++++++---------------------- | ||
1 file changed, 43 insertions(+), 35 deletions(-) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 2bfbcd4c6b..c28168f050 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -2137,26 +2137,30 @@ target_include_directories(grpc | ||
${_gRPC_ZLIB_INCLUDE_DIR} | ||
) | ||
target_link_libraries(grpc | ||
- ${_gRPC_BASELIB_LIBRARIES} | ||
- ${_gRPC_ZLIB_LIBRARIES} | ||
- ${_gRPC_CARES_LIBRARIES} | ||
- ${_gRPC_ADDRESS_SORTING_LIBRARIES} | ||
- ${_gRPC_RE2_LIBRARIES} | ||
- ${_gRPC_UPB_LIBRARIES} | ||
- ${_gRPC_ALLTARGETS_LIBRARIES} | ||
- absl::flat_hash_map | ||
- absl::inlined_vector | ||
- absl::bind_front | ||
- absl::hash | ||
- absl::statusor | ||
- absl::variant | ||
- absl::utility | ||
- gpr | ||
- ${_gRPC_SSL_LIBRARIES} | ||
- address_sorting | ||
+ # core libs | ||
+ PUBLIC ${_gRPC_ALLTARGETS_LIBRARIES} | ||
+ PUBLIC ${_gRPC_BASELIB_LIBRARIES} | ||
+ # vendored libs | ||
+ PUBLIC ${_gRPC_ADDRESS_SORTING_LIBRARIES} | ||
+ PUBLIC ${_gRPC_UPB_LIBRARIES} | ||
+ # external dependencies used within grpc | ||
+ PRIVATE ${_gRPC_CARES_LIBRARIES} | ||
+ PRIVATE ${_gRPC_RE2_LIBRARIES} | ||
+ PRIVATE ${_gRPC_SSL_LIBRARIES} | ||
+ PRIVATE ${_gRPC_ZLIB_LIBRARIES} | ||
+ # external dependencies that need to available at runtime | ||
+ PUBLIC absl::flat_hash_map | ||
+ PUBLIC absl::inlined_vector | ||
+ PUBLIC absl::bind_front | ||
+ PUBLIC absl::hash | ||
+ PUBLIC absl::statusor | ||
+ PUBLIC absl::variant | ||
+ PUBLIC absl::utility | ||
+ # targets which belong to grpc anyway | ||
+ PUBLIC gpr | ||
) | ||
if(_gRPC_PLATFORM_IOS OR _gRPC_PLATFORM_MAC) | ||
- target_link_libraries(grpc "-framework CoreFoundation") | ||
+ target_link_libraries(grpc PUBLIC "-framework CoreFoundation") | ||
endif() | ||
|
||
foreach(_hdr | ||
@@ -2719,25 +2723,29 @@ target_include_directories(grpc_unsecure | ||
${_gRPC_ZLIB_INCLUDE_DIR} | ||
) | ||
target_link_libraries(grpc_unsecure | ||
- ${_gRPC_BASELIB_LIBRARIES} | ||
- ${_gRPC_ZLIB_LIBRARIES} | ||
- ${_gRPC_CARES_LIBRARIES} | ||
- ${_gRPC_ADDRESS_SORTING_LIBRARIES} | ||
- ${_gRPC_RE2_LIBRARIES} | ||
- ${_gRPC_UPB_LIBRARIES} | ||
- ${_gRPC_ALLTARGETS_LIBRARIES} | ||
- absl::flat_hash_map | ||
- absl::inlined_vector | ||
- absl::bind_front | ||
- absl::hash | ||
- absl::statusor | ||
- absl::variant | ||
- absl::utility | ||
- gpr | ||
- address_sorting | ||
+ # core libs | ||
+ PUBLIC ${_gRPC_ALLTARGETS_LIBRARIES} | ||
+ PUBLIC ${_gRPC_BASELIB_LIBRARIES} | ||
+ # vendored libs | ||
+ PUBLIC ${_gRPC_ADDRESS_SORTING_LIBRARIES} | ||
+ PUBLIC ${_gRPC_UPB_LIBRARIES} | ||
+ # external dependencies used within grpc | ||
+ PRIVATE ${_gRPC_CARES_LIBRARIES} | ||
+ PRIVATE ${_gRPC_RE2_LIBRARIES} | ||
+ PRIVATE ${_gRPC_ZLIB_LIBRARIES} | ||
+ # external dependencies that need to available at runtime | ||
+ PUBLIC absl::flat_hash_map | ||
+ PUBLIC absl::inlined_vector | ||
+ PUBLIC absl::bind_front | ||
+ PUBLIC absl::hash | ||
+ PUBLIC absl::statusor | ||
+ PUBLIC absl::variant | ||
+ PUBLIC absl::utility | ||
+ # targets which belong to grpc anyway | ||
+ PUBLIC gpr | ||
) | ||
if(_gRPC_PLATFORM_IOS OR _gRPC_PLATFORM_MAC) | ||
- target_link_libraries(grpc_unsecure "-framework CoreFoundation") | ||
+ target_link_libraries(grpc_unsecure PUBLIC "-framework CoreFoundation") | ||
endif() | ||
|
||
foreach(_hdr | ||
-- | ||
2.37.0.windows.1 | ||
|
Oops, something went wrong.