Skip to content

Commit

Permalink
upb: Integrate upb de-vendoring changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tradias committed Jul 30, 2024
1 parent 3aa4f4b commit 72241a3
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 39 deletions.
72 changes: 35 additions & 37 deletions ports/grpc/00009-use-system-upb.patch
Original file line number Diff line number Diff line change
@@ -1,68 +1,67 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a3b39a1..8d7c1f6 100644
index 43fa8f6d97..8c28c3fc32 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
@@ -3345,16 +3345,6 @@ add_library(grpc_unsecure
src/core/util/json/json_object_loader.cc
src/core/util/json/json_reader.cc
src/core/util/json/json_writer.cc
- 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/internal/decode_fast.c
- third_party/upb/upb/wire/reader.c
${gRPC_ADDITIONAL_DLL_SRC}
)

@@ -3456,6 +3445,7 @@ target_link_libraries(gtest
endif()
@@ -3593,7 +3583,7 @@ target_link_libraries(gtest


+if(0) # vcpkg upb
add_library(upb ${_gRPC_STATIC_WIN32}
endif()
-
+if(0)
add_library(upb_base_lib
third_party/upb/upb/base/status.c
third_party/upb/upb/mem/alloc.c
@@ -3818,6 +3808,7 @@ if(gRPC_INSTALL)
)
@@ -3644,7 +3634,6 @@ if(gRPC_INSTALL)
)
endif()

-
add_library(upb_json_lib ${_gRPC_STATIC_WIN32}
third_party/upb/upb/json/decode.c
third_party/upb/upb/json/encode.c
@@ -3981,6 +3970,7 @@ if(gRPC_INSTALL)
ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
)
endif()
+endif() # vcpkg upb
+endif()

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
@@ -5416,16 +5406,6 @@ add_library(grpc_authorization_provider
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
src/core/util/json/json_reader.cc
src/core/util/json/json_writer.cc
- 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/internal/decode_fast.c
- third_party/upb/upb/wire/reader.c
)

target_compile_features(grpc_authorization_provider PUBLIC cxx_std_14)
@@ -30412,9 +30384,9 @@ generate_pkgconfig(
@@ -37649,9 +37629,9 @@ generate_pkgconfig(
"high performance general RPC framework"
"${gRPC_CORE_VERSION}"
"absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_check absl_cleanup absl_config 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_log absl_log_globals absl_log_severity absl_memory absl_no_destructor 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"
Expand All @@ -74,7 +73,7 @@ index a3b39a1..8d7c1f6 100644
"grpc.pc")

# grpc_unsecure .pc file
@@ -30423,9 +30395,9 @@ generate_pkgconfig(
@@ -37660,9 +37640,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_check absl_cleanup absl_config 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_log absl_log_globals absl_log_severity absl_memory absl_no_destructor 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"
Expand All @@ -86,7 +85,7 @@ index a3b39a1..8d7c1f6 100644
"grpc_unsecure.pc")

# grpc++ .pc file
@@ -30434,9 +30406,9 @@ generate_pkgconfig(
@@ -37671,9 +37651,9 @@ generate_pkgconfig(
"C++ wrapper for gRPC"
"${gRPC_CPP_VERSION}"
"absl_absl_check absl_absl_log absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_check absl_cleanup absl_config 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_log absl_log_globals absl_log_severity absl_memory absl_no_destructor 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"
Expand All @@ -98,7 +97,7 @@ index a3b39a1..8d7c1f6 100644
"grpc++.pc")

# grpc++_unsecure .pc file
@@ -30445,7 +30417,7 @@ generate_pkgconfig(
@@ -37682,11 +37662,12 @@ generate_pkgconfig(
"C++ wrapper for gRPC without SSL"
"${gRPC_CPP_VERSION}"
"absl_absl_check absl_absl_log absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_check absl_cleanup absl_config 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_log absl_log_globals absl_log_severity absl_memory absl_no_destructor 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"
Expand All @@ -113,13 +112,13 @@ index a3b39a1..8d7c1f6 100644
# grpcpp_otel_plugin .pc file
generate_pkgconfig(
"gRPC++ OpenTelemetry Plugin"
@@ -37697,3 +37698,4 @@ generate_pkgconfig(
@@ -37697,3 +37678,4 @@ generate_pkgconfig(
"-lgrpcpp_otel_plugin"
"-laddress_sorting -lupb_textformat_lib -lupb_json_lib -lupb_message_lib -lupb_mem_lib -lupb_base_lib -lutf8_range_lib"
"grpcpp_otel_plugin.pc")
+endif()
diff --git a/cmake/gRPCConfig.cmake.in b/cmake/gRPCConfig.cmake.in
index 98d8c6d..7cad2ab 100644
index d552e0bb4e..d40c07ce7a 100644
--- a/cmake/gRPCConfig.cmake.in
+++ b/cmake/gRPCConfig.cmake.in
@@ -9,6 +9,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/modules)
Expand All @@ -131,10 +130,10 @@ index 98d8c6d..7cad2ab 100644
# Targets
include(${CMAKE_CURRENT_LIST_DIR}/gRPCTargets.cmake)
diff --git a/cmake/upb.cmake b/cmake/upb.cmake
index 9156e5f..31324fa 100644
index 9156e5f48f..3cc7ad4005 100644
--- a/cmake/upb.cmake
+++ b/cmake/upb.cmake
@@ -14,7 +14,15 @@
@@ -14,7 +14,14 @@

set(UPB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/upb)

Expand All @@ -146,8 +145,7 @@ index 9156e5f..31324fa 100644
+
+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(upb_message_lib ALIAS upb::upb)
+add_library(utf8_range_lib ALIAS utf8_range::utf8_range)
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3225,8 +3225,8 @@
"port-version": 0
},
"grpc": {
"baseline": "1.60.0",
"port-version": 1
"baseline": "1.65.2",
"port-version": 0
},
"grppi": {
"baseline": "0.4.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/g-/grpc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "233a7265c9a4c3931f671578961229751302e725",
"version-semver": "1.65.2",
"port-version": 0
},
{
"git-tree": "a0e82a8a701c3b0397dae373e16c527d1cafaae5",
"version-semver": "1.60.0",
Expand Down

0 comments on commit 72241a3

Please sign in to comment.