-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
privatize grpc_unsecure linkage as well
- Loading branch information
1 parent
ed44ce8
commit 78a0672
Showing
3 changed files
with
71 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From 83c00ca57c5328b8f5ab1202bfaf2a9f43857d15 Mon Sep 17 00:00:00 2001 | ||
From: Mark Harfouche <[email protected]> | ||
Date: Mon, 15 Aug 2022 15:24:27 -0400 | ||
Subject: [PATCH] Link libraries privately | ||
Subject: [PATCH 1/2] Link libraries privately | ||
|
||
--- | ||
CMakeLists.txt | 46 ++++++++++++++++++++++++++++------------------ | ||
|
69 changes: 69 additions & 0 deletions
69
recipe/patches-grpc/0002-privatize-dlls-for-grpc_unsecure-as-well.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,69 @@ | ||
From 6a10b878747d9bcdb12b298612ea986d63cf997a Mon Sep 17 00:00:00 2001 | ||
From: "H. Vetinari" <[email protected]> | ||
Date: Tue, 16 Aug 2022 17:55:55 +0200 | ||
Subject: [PATCH 2/2] privatize dlls for grpc_unsecure as well | ||
|
||
--- | ||
CMakeLists.txt | 44 +++++++++++++++++++++++++++----------------- | ||
1 file changed, 27 insertions(+), 17 deletions(-) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 0523d72316..8a7a34996d 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -2729,25 +2729,35 @@ 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 | ||
+ PRIVATE ${_gRPC_BASELIB_LIBRARIES} | ||
+ PRIVATE ${_gRPC_ZLIB_LIBRARIES} | ||
+ PRIVATE ${_gRPC_CARES_LIBRARIES} | ||
+ PRIVATE ${_gRPC_ADDRESS_SORTING_LIBRARIES} | ||
+ PRIVATE ${_gRPC_RE2_LIBRARIES} | ||
+ PRIVATE ${_gRPC_UPB_LIBRARIES} | ||
+ PRIVATE ${_gRPC_ALLTARGETS_LIBRARIES} | ||
+ PRIVATE absl::flat_hash_map | ||
+ PRIVATE absl::inlined_vector | ||
+ PRIVATE absl::bind_front | ||
+ PRIVATE absl::hash | ||
+ PRIVATE absl::statusor | ||
+ PRIVATE absl::variant | ||
+ PRIVATE absl::utility | ||
+ PRIVATE gpr | ||
+ PRIVATE address_sorting | ||
) | ||
if(_gRPC_PLATFORM_IOS OR _gRPC_PLATFORM_MAC) | ||
- target_link_libraries(grpc_unsecure "-framework CoreFoundation") | ||
+ find_library(FRAMEWORK_CoreFoundation | ||
+ NAMES CoreFoundation | ||
+ PATHS ${CMAKE_OSX_SYSROOT}/System/Library | ||
+ PATH_SUFFIXES Frameworks | ||
+ NO_DEFAULT_PATH) | ||
+ if( ${FRAMEWORK_CoreFoundation} STREQUAL FRAMEWORK_CoreFoundation-NOTFOUND) | ||
+ MESSAGE(ERROR ": Framework CoreFoundation not found") | ||
+ else() | ||
+ target_link_libraries(grpc_unsecure PUBLIC "${FRAMEWORK_CoreFoundation}") | ||
+ MESSAGE(STATUS "Framework CoreFoundation found at ${FRAMEWORK_CoreFoundation}") | ||
+ endif() | ||
endif() | ||
|
||
foreach(_hdr | ||
-- | ||
2.37.0.windows.1 | ||
|