mirror of
				https://git.proxmox.com/git/llvm-toolchain
				synced 2025-11-04 04:01:50 +00:00 
			
		
		
		
	apply upstream
This commit is contained in:
		
							parent
							
								
									b892162cc7
								
							
						
					
					
						commit
						1ef175bbde
					
				
							
								
								
									
										52
									
								
								debian/patches/link-grpc.diff
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										52
									
								
								debian/patches/link-grpc.diff
									
									
									
									
										vendored
									
									
								
							@ -1,52 +0,0 @@
 | 
			
		||||
Index: llvm-toolchain-snapshot_16~++20221227120055+36d70a6aea6b/cmake/Modules/FindGRPC.cmake
 | 
			
		||||
===================================================================
 | 
			
		||||
--- llvm-toolchain-snapshot_16~++20221227120055+36d70a6aea6b.orig/cmake/Modules/FindGRPC.cmake
 | 
			
		||||
+++ llvm-toolchain-snapshot_16~++20221227120055+36d70a6aea6b/cmake/Modules/FindGRPC.cmake
 | 
			
		||||
@@ -82,11 +82,28 @@ else()
 | 
			
		||||
     endif()
 | 
			
		||||
   endif()
 | 
			
		||||
   if(NOT TARGET grpc++)
 | 
			
		||||
+    find_library(GPR_LIBRARY gpr $GRPC_OPTS REQUIRED)
 | 
			
		||||
+    add_library(gpr UNKNOWN IMPORTED GLOBAL)
 | 
			
		||||
+    message(STATUS "Using gpr: " ${GPR_LIBRARY})
 | 
			
		||||
+    set_target_properties(gpr PROPERTIES IMPORTED_LOCATION ${GPR_LIBRARY})
 | 
			
		||||
+
 | 
			
		||||
     find_library(GRPC_LIBRARY grpc++ ${GRPC_OPTS} REQUIRED)
 | 
			
		||||
     add_library(grpc++ UNKNOWN IMPORTED GLOBAL)
 | 
			
		||||
     message(STATUS "Using grpc++: " ${GRPC_LIBRARY})
 | 
			
		||||
     set_target_properties(grpc++ PROPERTIES IMPORTED_LOCATION ${GRPC_LIBRARY})
 | 
			
		||||
     target_include_directories(grpc++ INTERFACE ${GRPC_INCLUDE_PATHS})
 | 
			
		||||
+    find_library(GRPC2_LIBRARY grpc $GRPC_OPTS REQUIRED)
 | 
			
		||||
+    add_library(grpc UNKNOWN IMPORTED GLOBAL)
 | 
			
		||||
+    message(STATUS "Using grpc: " ${GRPC2_LIBRARY})
 | 
			
		||||
+    set_target_properties(grpc PROPERTIES IMPORTED_LOCATION ${GRPC2_LIBRARY})
 | 
			
		||||
+
 | 
			
		||||
+    find_library(ABSL_SYNCHRONIZATION_LIBRARY absl_synchronization $GRPC_OPTS QUIET)
 | 
			
		||||
+    if (ABSL_SYNCHRONIZATION_LIBRARY)
 | 
			
		||||
+      add_library(absl_synchronization UNKNOWN IMPORTED GLOBAL)
 | 
			
		||||
+      message(STATUS "Using absl_synchronization: " ${ABSL_SYNCHRONIZATION_LIBRARY})
 | 
			
		||||
+      set_target_properties(absl_synchronization PROPERTIES IMPORTED_LOCATION ${ABSL_SYNCHRONIZATION_LIBRARY})
 | 
			
		||||
+    endif()
 | 
			
		||||
+
 | 
			
		||||
     if (ENABLE_GRPC_REFLECTION)
 | 
			
		||||
       find_library(GRPC_REFLECTION_LIBRARY grpc++_reflection ${GRPC_OPTS} REQUIRED)
 | 
			
		||||
       add_library(grpc++_reflection UNKNOWN IMPORTED GLOBAL)
 | 
			
		||||
Index: llvm-toolchain-snapshot_16~++20221227120055+36d70a6aea6b/clang/cmake/modules/AddGRPC.cmake
 | 
			
		||||
===================================================================
 | 
			
		||||
--- llvm-toolchain-snapshot_16~++20221227120055+36d70a6aea6b.orig/clang/cmake/modules/AddGRPC.cmake
 | 
			
		||||
+++ llvm-toolchain-snapshot_16~++20221227120055+36d70a6aea6b/clang/cmake/modules/AddGRPC.cmake
 | 
			
		||||
@@ -4,8 +4,13 @@ function(generate_clang_protos_library L
 | 
			
		||||
   # Take the first two args and forward the remaining to generate_proto_sources.
 | 
			
		||||
   cmake_parse_arguments(PARSE_ARGV 2 PROTO "" "" "")
 | 
			
		||||
   generate_proto_sources(ProtoSource ${ProtoFile} ${PROTO_UNPARSED_ARGUMENTS})
 | 
			
		||||
+  set(LINKED_GRPC_LIBRARIES protobuf gpr grpc grpc++)
 | 
			
		||||
 
 | 
			
		||||
+  if (ABSL_SYNCHRONIZATION_LIBRARY)
 | 
			
		||||
+    list(APPEND LINKED_GRPC_LIBRARIES absl_synchronization)
 | 
			
		||||
+  endif()
 | 
			
		||||
   add_clang_library(${LibraryName} ${ProtoSource}
 | 
			
		||||
     PARTIAL_SOURCES_INTENDED
 | 
			
		||||
-    LINK_LIBS PUBLIC grpc++ protobuf)
 | 
			
		||||
+    LINK_LIBS PUBLIC  ${LINKED_GRPC_LIBRARIES})
 | 
			
		||||
+
 | 
			
		||||
 endfunction()
 | 
			
		||||
							
								
								
									
										1
									
								
								debian/patches/series
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								debian/patches/series
									
									
									
									
										vendored
									
									
								
							@ -146,4 +146,3 @@ revert-update-doc.diff
 | 
			
		||||
unwind-force-pthread-dl.diff
 | 
			
		||||
force-sse2-compiler-rt.diff
 | 
			
		||||
bolt-disable-emit-relocs.patch
 | 
			
		||||
link-grpc.diff
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user