Skip to content

Commit

Permalink
Migrate to the modern linker input API.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminp committed Nov 4, 2020
1 parent d1d04eb commit cf9e63f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rust/private/legacy_cc_starlark_api_shim.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def get_libs_for_static_executable(dep):
Returns:
depset: A depset[File]
"""
libraries_to_link = dep[CcInfo].linking_context.libraries_to_link
return depset([_get_preferred_artifact(lib) for lib in libraries_to_link.to_list()])
linker_inputs = dep[CcInfo].linking_context.linker_inputs.to_list()
return depset([_get_preferred_artifact(lib) for li in linker_inputs for lib in li.libraries])

def _get_preferred_artifact(library_to_link):
"""Gets the first available library to link from a CcInfo provider's deprecated libraries_to_link field
Expand Down

0 comments on commit cf9e63f

Please sign in to comment.