Migrate to modern Starlark linking api.

See https://github.com/bazelbuild/bazel/issues/10860.
pull/13171/head
Benjamin Peterson 4 years ago
parent 901744a97e
commit b5bd5807a7
  1. 5
      bazel/upb_proto_library.bzl

@ -183,10 +183,7 @@ def _upb_proto_rule_impl(ctx):
fail("proto_library rule must generate _UpbWrappedCcInfo or " +
"_UpbDefsWrappedCcInfo (aspect should have handled this).")
if type(cc_info.linking_context.libraries_to_link) == "list":
lib = cc_info.linking_context.libraries_to_link[0]
else:
lib = cc_info.linking_context.libraries_to_link.to_list()[0]
lib = cc_info.linking_context.linker_inputs.to_list()[0].libraries[0]
files = _filter_none([
lib.static_library,
lib.pic_static_library,

Loading…
Cancel
Save