diff --git a/bazel/upb_proto_library.bzl b/bazel/upb_proto_library.bzl index 941249d17..9c4f85be3 100644 --- a/bazel/upb_proto_library.bzl +++ b/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(