tools/binary_size/libsupersize/ar.py
def ExpandThinArchives(paths, output_directory):
  """Expands all thin archives found in |paths| into .o paths.

  Args:
    paths: List of paths relative to |output_directory|.
    output_directory: Output directory.

  Returns:
    * A new list of paths with all thin archives replaced by .o paths.
    * A set of all .a paths that were thin archives.
  """
  expanded_paths = []
  thin_paths = set()
  num_archives = 0
  for path in paths:
    if not path.endswith('.a'):
      expanded_paths.append(path)
      continue
    num_archives += 1
    abs_path = os.path.join(output_directory, path)
    if not IsThinArchive(abs_path):
      expanded_paths.append(path)
      continue

    thin_paths.add(path)
    # Thin archive.
    for subpath, _ in IterArchiveChunks(abs_path):
      expanded_paths.append(CreateThinObjectPath(path, subpath))

  logging.info('%d of %d .a files were thin archives',
               len(thin_paths), num_archives)
  return expanded_paths, thin_paths
Expands all thin archives found in |paths| into .o paths.

  Args:
    paths: List of paths relative to |output_directory|.
    output_directory: Output directory.

  Returns:
    * A new list of paths with all thin archives replaced by .o paths.
    * A set of all .a paths that were thin archives.
  
Expands all thin archives found in |paths| into .o paths.
Expands all thin archives found in |paths| into . o paths .
def ExpandThinArchives(paths, output_directory):
  expanded_paths = []
  thin_paths = set()
  num_archives = 0
  for path in paths:
    if not path.endswith('.a'):
      expanded_paths.append(path)
      continue
    num_archives += 1
    abs_path = os.path.join(output_directory, path)
    if not IsThinArchive(abs_path):
      expanded_paths.append(path)
      continue
    thin_paths.add(path)
    for subpath, _ in IterArchiveChunks(abs_path):
      expanded_paths.append(CreateThinObjectPath(path, subpath))
  logging.info('%d of %d .a files were thin archives',
               len(thin_paths), num_archives)
  return expanded_paths, thin_paths
def ExpandThinArchives ( paths , output_directory ) : expanded_paths = [ ] thin_paths = set ( ) num_archives = 0 for path in paths : if not path . endswith ( '.a' ) : expanded_paths . append ( path ) continue num_archives += 1 abs_path = os . path . join ( output_directory , path ) if not IsThinArchive ( abs_path ) : expanded_paths . append ( path ) continue thin_paths . add ( path ) for subpath , _ in IterArchiveChunks ( abs_path ) : expanded_paths . append ( CreateThinObjectPath ( path , subpath ) ) logging . info ( '%d of %d .a files were thin archives' , len ( thin_paths ) , num_archives ) return expanded_paths , thin_paths
Expands all thin archives found in |paths| into .o paths.
Expands all thin archives found in |paths| into . o paths .
"""Expands all thin archives found in |paths| into .o paths.

  Args:
    paths: List of paths relative to |output_directory|.
    output_directory: Output directory.

  Returns:
    * A new list of paths with all thin archives replaced by .o paths.
    * A set of all .a paths that were thin archives.
  """ # Thin archive.
A new list of paths with all thin archives replaced by .o paths.
A set of all .a paths that were thin archives.
A new list of paths with all thin archives replaced by . o paths . A set of all . a paths that were thin archives .
paths
List of paths relative to |output_directory|.
List of paths relative to |output_directory| .
output_directory
None