Skip to content

Commit eeddfc1

Browse files
committed
Add patch for com_google_protobuf
See protocolbuffers/protobuf#16844
1 parent 02a3a7d commit eeddfc1

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
diff --git a/build_defs/cpp_opts.bzl b/build_defs/cpp_opts.bzl
2+
index f667a4088..da463ca45 100644
3+
--- a/build_defs/cpp_opts.bzl
4+
+++ b/build_defs/cpp_opts.bzl
5+
@@ -44,6 +44,11 @@ LINK_OPTS = select({
6+
"-lm",
7+
"-framework CoreFoundation",
8+
],
9+
+ "@platforms//os:windows": [
10+
+ "-ldbghelp",
11+
+ "-lpthread",
12+
+ "-lm",
13+
+ ],
14+
"//conditions:default": [
15+
"-lpthread",
16+
"-lm",
17+
diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc
18+
index 60900d215..10c41b441 100644
19+
--- a/src/google/protobuf/port_def.inc
20+
+++ b/src/google/protobuf/port_def.inc
21+
@@ -673,7 +673,7 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3),
22+
#error PROTOBUF_DESCRIPTOR_WEAK_MESSAGES_ALLOWED was previously defined
23+
#endif
24+
#if defined(__GNUC__) && defined(__clang__) && !defined(__APPLE__) && \
25+
- !defined(_MSC_VER)
26+
+ !defined(_MSC_VER) && !defined(_WIN32)
27+
#define PROTOBUF_DESCRIPTOR_WEAK_MESSAGES_ALLOWED
28+
#endif
29+

haskell/repositories.bzl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,12 @@ def rules_haskell_dependencies():
134134
urls = [
135135
"https://github.com/protocolbuffers/protobuf/archive/refs/tags/v28.0.tar.gz",
136136
],
137+
patches = [
138+
# see https://github.com/protocolbuffers/protobuf/issues/16844
139+
# TODO: remove for protobuf version >= 32.0
140+
"@rules_haskell//haskell:private/com_google_protobuf-protoc-dbghlp.diff",
141+
],
142+
patch_args = ["-p1"],
137143
)
138144
maybe(
139145
http_archive,

0 commit comments

Comments
 (0)