forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgrpc.patch
More file actions
307 lines (276 loc) · 10.8 KB
/
grpc.patch
File metadata and controls
307 lines (276 loc) · 10.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
diff --git a/BUILD b/BUILD
index 9e067aa29e..089a447ec4 100644
--- a/BUILD
+++ b/BUILD
@@ -34,7 +34,7 @@ package(
default_visibility = ["//visibility:public"],
features = [
"-parse_headers",
- "layering_check",
+ "-layering_check",
],
)
diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl
index a3b8923b6e..f4a2ed3f13 100644
--- a/bazel/grpc_build_system.bzl
+++ b/bazel/grpc_build_system.bzl
@@ -27,7 +27,6 @@
Contains macros used throughout the repo.
"""
-load("@build_bazel_apple_support//rules:universal_binary.bzl", "universal_binary")
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test")
load("@build_bazel_rules_apple//apple/testing/default_runner:ios_test_runner.bzl", "ios_test_runner")
load("@com_google_protobuf//bazel:cc_proto_library.bzl", "cc_proto_library")
@@ -195,16 +194,11 @@ def grpc_proto_plugin(name, srcs = [], deps = []):
srcs = srcs,
deps = deps,
)
- universal_binary(
- name = name + "_universal",
- binary = name + "_native",
- )
# In order to avoid warnings from Bazel, names of the rule and its output file must differ.
native.genrule(
name = name,
srcs = select({
- "@platforms//os:macos": [name + "_universal"],
"//conditions:default": [name + "_native"],
}),
outs = [name + "_binary"],
diff --git a/include/grpc/event_engine/memory_request.h b/include/grpc/event_engine/memory_request.h
index 76bcbb2036..ad8cab842e 100644
--- a/include/grpc/event_engine/memory_request.h
+++ b/include/grpc/event_engine/memory_request.h
@@ -17,6 +17,8 @@
#include <grpc/support/port_platform.h>
#include <stddef.h>
+#include <string>
+
#include "absl/strings/string_view.h"
namespace grpc_event_engine {
diff --git a/src/core/BUILD b/src/core/BUILD
index 0a8eebafb9..6d4f158719 100644
--- a/src/core/BUILD
+++ b/src/core/BUILD
@@ -29,7 +29,7 @@ licenses(["reciprocal"])
package(
default_visibility = ["//:__subpackages__"],
features = [
- "layering_check",
+ "-layering_check",
],
)
diff --git a/src/core/channelz/v2tov1/property_list.cc b/src/core/channelz/v2tov1/property_list.cc
index 64bbb6307c..03367cce7c 100644
--- a/src/core/channelz/v2tov1/property_list.cc
+++ b/src/core/channelz/v2tov1/property_list.cc
@@ -15,6 +15,7 @@
#include "src/core/channelz/v2tov1/property_list.h"
#include <cstdint>
+#include <limits>
#include <optional>
#include <string>
diff --git a/src/core/lib/promise/detail/promise_factory.h b/src/core/lib/promise/detail/promise_factory.h
index 3fb5d68146..583a2f9553 100644
--- a/src/core/lib/promise/detail/promise_factory.h
+++ b/src/core/lib/promise/detail/promise_factory.h
@@ -125,17 +125,16 @@ struct OnceToken {};
// Promote a callable(A) -> T | Poll<T> to a PromiseFactory(A) -> Promise<T> by
// capturing A.
template <typename Token, typename A, typename F>
-GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION
- absl::enable_if_t<!IsVoidCallable<ResultOf<F(A)>>::value,
- PromiseLike<Curried<RemoveCVRef<F>, A>>>
- PromiseFactoryImpl(Token, F&& f, A&& arg) {
+absl::enable_if_t<!IsVoidCallable<ResultOf<F(A)>>::value,
+ PromiseLike<Curried<RemoveCVRef<F>, A>>>
+PromiseFactoryImpl(Token, F&& f, A&& arg) {
return Curried<RemoveCVRef<F>, A>(std::forward<F>(f), std::forward<A>(arg));
}
// Promote a callable() -> T|Poll<T> to a PromiseFactory(A) -> Promise<T>
// by dropping the argument passed to the factory.
template <typename A, typename F>
-GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline absl::enable_if_t<
+inline absl::enable_if_t<
!IsVoidCallable<ResultOf<F()>>::value, PromiseLike<RemoveCVRef<F>>>
PromiseFactoryImpl(OnceToken, F f, A&&) {
return PromiseLike<F>(std::move(f));
@@ -143,7 +142,7 @@ PromiseFactoryImpl(OnceToken, F f, A&&) {
// Promote a callable() -> Poll<T> to a PromiseFactory() -> Promise<T>
template <typename F>
-GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline absl::enable_if_t<
+inline absl::enable_if_t<
!IsVoidCallable<ResultOf<F()>>::value &&
PollTraits<ResultOf<F()>>::is_poll(),
PromiseLike<RemoveCVRef<F>>>
@@ -153,7 +152,7 @@ PromiseFactoryImpl(OnceToken, F f) {
// Promote a callable() -> T to a PromiseFactory() -> Immediate<T>
template <typename F>
-GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline auto PromiseFactoryImpl(
+inline auto PromiseFactoryImpl(
std::enable_if_t<!IsVoidCallable<ResultOf<F()>>::value &&
!PollTraits<ResultOf<F()>>::is_poll() &&
!std::is_same_v<ResultOf<F()>, void>,
@@ -163,7 +162,7 @@ GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline auto PromiseFactoryImpl(
return PromiseLike<decltype(f2)>(std::move(f2));
}
template <typename F>
-GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline auto PromiseFactoryImpl(
+inline auto PromiseFactoryImpl(
std::enable_if_t<!IsVoidCallable<ResultOf<F()>>::value &&
!PollTraits<ResultOf<F()>>::is_poll() &&
std::is_same_v<ResultOf<F()>, void>,
@@ -176,7 +175,7 @@ GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline auto PromiseFactoryImpl(
// Given a callable(A) -> Promise<T>, name it a PromiseFactory and use it.
template <typename Token, typename A, typename F>
-GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline absl::enable_if_t<
+inline absl::enable_if_t<
IsVoidCallable<ResultOf<F(A)>>::value,
PromiseLike<decltype(std::declval<F>()(std::declval<A>()))>>
PromiseFactoryImpl(Token, F&& f, A&& arg) {
@@ -185,7 +184,7 @@ PromiseFactoryImpl(Token, F&& f, A&& arg) {
// Given a callable(A) -> Promise<T>, name it a PromiseFactory and use it.
template <typename Token, typename A, typename F>
-GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline absl::enable_if_t<
+inline absl::enable_if_t<
IsVoidCallable<ResultOf<F(A)>>::value,
PromiseLike<decltype(std::declval<F>()(std::declval<A>()))>>
PromiseFactoryImpl(Token, F& f, A&& arg) {
@@ -195,19 +194,17 @@ PromiseFactoryImpl(Token, F& f, A&& arg) {
// Given a callable() -> Promise<T>, promote it to a
// PromiseFactory(A) -> Promise<T> by dropping the first argument.
template <typename Token, typename A, typename F>
-GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION
- absl::enable_if_t<IsVoidCallable<ResultOf<F()>>::value,
- PromiseLike<decltype(std::declval<F>()())>>
- PromiseFactoryImpl(Token, F&& f, A&&) {
+absl::enable_if_t<IsVoidCallable<ResultOf<F()>>::value,
+ PromiseLike<decltype(std::declval<F>()())>>
+PromiseFactoryImpl(Token, F&& f, A&&) {
return f();
}
// Given a callable() -> Promise<T>, name it a PromiseFactory and use it.
template <typename Token, typename F>
-GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION
- absl::enable_if_t<IsVoidCallable<ResultOf<F()>>::value,
- PromiseLike<decltype(std::declval<F>()())>>
- PromiseFactoryImpl(Token, F&& f) {
+absl::enable_if_t<IsVoidCallable<ResultOf<F()>>::value,
+ PromiseLike<decltype(std::declval<F>()())>>
+PromiseFactoryImpl(Token, F&& f) {
return f();
}
@@ -225,10 +222,10 @@ class OncePromiseFactory {
std::declval<A>()));
using UnderlyingFactory = F;
- GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION explicit OncePromiseFactory(F f)
+ explicit OncePromiseFactory(F f)
: f_(std::move(f)) {}
- GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION Promise Make(Arg&& a) {
+ Promise Make(Arg&& a) {
return PromiseFactoryImpl(OnceToken{}, std::move(f_), std::forward<Arg>(a));
}
};
@@ -243,10 +240,10 @@ class OncePromiseFactory<void, F> {
using Promise = decltype(PromiseFactoryImpl(OnceToken{}, std::move(f_)));
using UnderlyingFactory = F;
- GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION explicit OncePromiseFactory(F f)
+ explicit OncePromiseFactory(F f)
: f_(std::move(f)) {}
- GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION Promise Make() {
+ Promise Make() {
return PromiseFactoryImpl(OnceToken{}, std::move(f_));
}
};
@@ -265,13 +262,13 @@ class RepeatedPromiseFactory {
using Promise =
decltype(PromiseFactoryImpl(RepeatableToken{}, f_, std::declval<A>()));
- GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION explicit RepeatedPromiseFactory(F f)
+ explicit RepeatedPromiseFactory(F f)
: f_(std::move(f)) {}
- GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION Promise Make(Arg&& a) const {
+ Promise Make(Arg&& a) const {
return PromiseFactoryImpl(RepeatableToken{}, f_, std::forward<Arg>(a));
}
- GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION Promise Make(Arg&& a) {
+ Promise Make(Arg&& a) {
return PromiseFactoryImpl(RepeatableToken{}, f_, std::forward<Arg>(a));
}
template <typename U>
@@ -293,13 +290,13 @@ class RepeatedPromiseFactory<void, F> {
using Arg = void;
using Promise = decltype(PromiseFactoryImpl(RepeatableToken{}, f_));
- GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION explicit RepeatedPromiseFactory(F f)
+ explicit RepeatedPromiseFactory(F f)
: f_(std::move(f)) {}
- GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION Promise Make() const {
+ Promise Make() const {
return PromiseFactoryImpl(RepeatableToken{}, f_);
}
- GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION Promise Make() {
+ Promise Make() {
return PromiseFactoryImpl(RepeatableToken{}, f_);
}
};
diff --git a/src/core/util/glob.cc b/src/core/util/glob.cc
index 1b1c16e23d..22e54259f0 100644
--- a/src/core/util/glob.cc
+++ b/src/core/util/glob.cc
@@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <algorithm>
+
#include "absl/strings/string_view.h"
namespace grpc_core {
diff --git a/src/proto/grpc/health/v1/BUILD b/src/proto/grpc/health/v1/BUILD
index f6165e0392..374653516a 100644
--- a/src/proto/grpc/health/v1/BUILD
+++ b/src/proto/grpc/health/v1/BUILD
@@ -44,3 +44,10 @@ filegroup(
"health.proto",
],
)
+
+# This alias is required by Envoy's build
+alias(
+ name = "_health_proto_only",
+ actual = ":health_proto",
+ visibility = ["//visibility:public"],
+)
diff --git a/third_party/BUILD b/third_party/BUILD
index 13a4714d4b..8664e99ffc 100644
--- a/third_party/BUILD
+++ b/third_party/BUILD
@@ -33,25 +33,19 @@ config_setting(
alias(
name = "libssl",
- actual = select({
- ":grpc_use_openssl_setting": "@openssl//:ssl",
- "//conditions:default": "@boringssl//:ssl",
- }),
+ actual = "@envoy//bazel:ssl",
tags = ["manual"],
)
alias(
name = "libcrypto",
- actual = select({
- ":grpc_use_openssl_setting": "@openssl//:crypto",
- "//conditions:default": "@boringssl//:crypto",
- }),
+ actual = "@envoy//bazel:crypto",
tags = ["manual"],
)
alias(
name = "madler_zlib",
- actual = "@zlib//:zlib",
+ actual = "@envoy//bazel:zlib",
tags = ["manual"],
)
@@ -82,7 +76,7 @@ alias(
alias(
name = "cares",
- actual = "@com_github_cares_cares//:ares",
+ actual = "@c-ares//:ares",
tags = ["manual"],
)