[bazel] Fix disallowing dylibs on darwin (#1180)

Since this bazel commit
ec5553352f
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.

Co-authored-by: Adam Cozzette <acozzette@google.com>
pull/13908/head
Keith Smiley 1 year ago committed by Adam Cozzette
parent 72decab5ec
commit 7afb426a5a
  1. 2
      upb/bazel/upb_proto_library.bzl

@ -153,7 +153,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"),
)
return CcInfo(

Loading…
Cancel
Save