def process_link_depends(self, sources, environment):
    "Process the link_depends keyword argument.\n\n        This is designed to handle strings, Files, and the output of Custom\n        Targets. Notably it doesn't handle generator() returned objects, since\n        adding them as a link depends would inherently cause them to be\n        generated twice, since the output needs to be passed to the ld_args and\n        link_depends.\n        "
    sources = listify(sources)
    for s in sources:
        if hasattr(s, 'held_object'):
            s = s.held_object
        if isinstance(s, File):
            self.link_depends.append(s)
        elif isinstance(s, str):
            self.link_depends.append(File.from_source_file(environment.source_dir, self.subdir, s))
        elif hasattr(s, 'get_outputs'):
            self.link_depends.extend([File.from_built_file(s.subdir, p) for p in s.get_outputs()])
        else:
            raise InvalidArguments('Link_depends arguments must be strings, Files, or a Custom Target, or lists thereof.')
Process the link_depends keyword argument.

This is designed to handle strings, Files, and the output of Custom
Targets. Notably it doesn't handle generator() returned objects, since
adding them as a link depends would inherently cause them to be
generated twice, since the output needs to be passed to the ld_args and
link_depends.
def process_link_depends(self, sources, environment):
    "Process the link_depends keyword argument.\n\n        This is designed to handle strings, Files, and the output of Custom\n        Targets. Notably it doesn't handle generator() returned objects, since\n        adding them as a link depends would inherently cause them to be\n        generated twice, since the output needs to be passed to the ld_args and\n        link_depends.\n        "
    sources = listify(sources)
    for s in sources:
        if hasattr(s, 'held_object'):
            s = s.held_object
        if isinstance(s, File):
            self.link_depends.append(s)
        elif isinstance(s, str):
            self.link_depends.append(File.from_source_file(environment.source_dir, self.subdir, s))
        elif hasattr(s, 'get_outputs'):
            self.link_depends.extend([File.from_built_file(s.subdir, p) for p in s.get_outputs()])
        else:
            raise InvalidArguments('Link_depends arguments must be strings, Files, or a Custom Target, or lists thereof.')