def swift_library_output_map(name, module_link_name):
  """Returns the dictionary of implicit outputs for a `swift_library`.

  This function is used to specify the `outputs` of the `swift_library` rule; as
  such, its arguments must be named exactly the same as the attributes to which
  they refer.

  Args:
    name: The name of the target being built.
    module_link_name: The module link name of the target being built.

  Returns:
    The implicit outputs dictionary for a `swift_library`.
  """
  lib_name = module_link_name if module_link_name else name
  return {
      "archive": "lib{}.a".format(lib_name),
  }