def GenerateCompareBuildsLink(build_ids, siblings):
  """Return the URL to compare siblings for this build.

  Args:
    build_ids: list of CIDB id for the builds.
    siblings: boolean indicating whether sibling builds should be included.

  Returns:
    The fully formed URL.
  """
  params = ['buildIds=%s' % ','.join([str(b) for b in build_ids])]
  if siblings:
    params.append('includeSiblings=true')
  return 'http://go/buildCompare?%s' % '&'.join(params)