Skip to content

Commit 5cd6270

Browse files
committedJun 26, 2024·
Add patch for com_google_protobuf
See protocolbuffers/protobuf#16844
1 parent 467e2e7 commit 5cd6270

File tree

2 files changed

+32
-0
lines changed

2 files changed

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

‎haskell/repositories.bzl

+5
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ def rules_haskell_dependencies():
126126
urls = [
127127
"https://github.com/protocolbuffers/protobuf/archive/refs/tags/v27.0.tar.gz",
128128
],
129+
patches = [
130+
# see https://github.com/protocolbuffers/protobuf/issues/16844
131+
"@rules_haskell//haskell:private/com_google_protobuf-protoc-dbghlp.diff",
132+
],
133+
patch_args = ["-p1"],
129134
)
130135
maybe(
131136
http_archive,

0 commit comments

Comments
 (0)
Please sign in to comment.