Skip to content

Commit

Permalink
[bazel] Fix disallowing dylibs on darwin (#1180)
Browse files Browse the repository at this point in the history
Since this bazel commit
bazelbuild/bazel@ec55533
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 <[email protected]>
  • Loading branch information
keith and acozzette authored Sep 7, 2023
1 parent 9d923c8 commit e7430e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bazel/upb_proto_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit e7430e6

Please sign in to comment.