From a2013f0fc21300768b87714d8a4db0a5cd845028 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 23 Jul 2019 00:05:43 +0200 Subject: Trying to be more flexible with the version of bazel we can use here. --- bazel/upb_proto_library.bzl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bazel/upb_proto_library.bzl b/bazel/upb_proto_library.bzl index 528d34b..cc6bcff 100644 --- a/bazel/upb_proto_library.bzl +++ b/bazel/upb_proto_library.bzl @@ -175,7 +175,10 @@ def _upb_proto_rule_impl(ctx): "_WrappedGeneratedSrcsInfo (aspect should have handled this).") cc_info = dep[_WrappedCcInfo].cc_info srcs = dep[_WrappedGeneratedSrcsInfo].srcs - lib = cc_info.linking_context.libraries_to_link[0] + 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] files = _filter_none([ lib.static_library, lib.pic_static_library, -- cgit v1.2.3