``` @classmethod def calculate_sources(cls, targ...
# general
h
Copy code
@classmethod
  def calculate_sources(cls, targets):
    sources = set()
    for target in targets:
      # Note that the target's sources may contain non-go files,
      # e.g., sibling .h/.c files, so we filter on is_go_source.
      sources.update(source for source in target.sources_relative_to_buildroot()
                     if GoLocalSource.is_go_source(source))
    return sources