def has_ldflags(argv):
  """Check if any linker flags are present in argv."""
  link_flags = set(('-ldflags', '-linkmode', '-extld', '-extldflags'))
  if set(argv) & link_flags:
    return True
  for arg in argv:
    if arg.startswith('-ldflags=') or arg.startswith('-linkmode='):
      return True
  return False