forked from phst/rules_elisp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupb.patch
29 lines (26 loc) · 1.51 KB
/
upb.patch
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
From df5e4901b916ecccefb8e37c5ebcbc441590848d Mon Sep 17 00:00:00 2001
From: Keith Smiley <[email protected]>
Date: Wed, 22 Feb 2023 08:44:59 -0800
Subject: [PATCH] [bazel] Fix disallowing dylibs on darwin
Since this bazel commit
https://github.com/bazelbuild/bazel/commit/ec5553352f2f661d39ac4cf665dd9b3c779e614c
building dylibs like the ones in this rule on darwin platforms has been
unsupported. This feature is a default C++ toolchain feature to indicate
this. In bazel 7.x these dylibs will fail to link if they are still
built. As far as I can tell in the tests even if they are built they are
never used on macOS.
---
bazel/upb_proto_library.bzl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bazel/upb_proto_library.bzl b/bazel/upb_proto_library.bzl
index b1eb3eb48d..f03da6d8a6 100644
--- bazel/upb_proto_library.bzl
+++ bazel/upb_proto_library.bzl
@@ -159,7 +159,7 @@ def _cc_library_func(ctx, name, hdrs, srcs, copts, includes, dep_ccinfos):
cc_toolchain = toolchain,
compilation_outputs = compilation_outputs,
linking_contexts = linking_contexts,
- disallow_dynamic_library = cc_common.is_enabled(feature_configuration = feature_configuration, feature_name = "targets_windows"),
+ disallow_dynamic_library = cc_common.is_enabled(feature_configuration = feature_configuration, feature_name = "targets_windows") or not cc_common.is_enabled(feature_configuration = feature_configuration, feature_name = "supports_dynamic_linker"),
**blaze_only_args
)