parameters: (version_quad, arch, lib_overrides,
                                      options)
docstring: Build an architecture specific version for the chrome component
    install (an actual CRX, vs a zip file).  Though this is a CRX,
    it is not used as a chrome extension as the CWS and unpacked version.
docstring_summary: Build an architecture specific version for the chrome component
    install (an actual CRX, vs a zip file).  Though this is a CRX,
    it is not used as a chrome extension as the CWS and unpacked version.
docstring_tokens: Build an architecture specific version for the chrome component install ( an actual CRX vs a zip file ) . Though this is a CRX it is not used as a chrome extension as the CWS and unpacked version .
function: def BuildArchCRXForComponentUpdater(version_quad, arch, lib_overrides,
                                      options):
    """ Build an architecture specific version for the chrome component
    install (an actual CRX, vs a zip file).  Though this is a CRX,
    it is not used as a chrome extension as the CWS and unpacked version.
    """
    parent_dir, target_dir = PnaclDirs.OutputArchDir(arch)
  
    StepBanner('BUILD ARCH CRX %s' % arch,
               'Packaging for arch %s in %s' % (arch, target_dir))
  
    # Copy llc and ld.
    copytree_existing(PnaclDirs.SandboxedCompilerDir(arch), target_dir)
  
    # Rename llc.nexe to llc, ld.nexe to ld
    for tool in ('llc', 'ld'):
      shutil.move(J(target_dir, '%s.nexe' % tool), J(target_dir, tool))
  
    # Copy native libraries.
    copytree_existing(PnaclDirs.LibDir(arch), target_dir)
    # Also copy files from the list of overrides.
    if arch in lib_overrides:
      for override in lib_overrides[arch]:
        logging.info('Copying override %s to %s' % (override, target_dir))
        shutil.copy2(override, target_dir)
  
    # Skip the CRX generation if we are only building the unpacked version
    # for commandline testing.
    if options.unpacked_only:
      return
  
    # Generate manifest one level up (to have layout look like the "all" package).
    # NOTE: this does not have 'web_accessible_resources' and does not have
    # the all_host_permissions, since it isn't used via chrome-extension://
    # URL requests.
    PnaclPackaging.GenerateManifests(parent_dir,
                                     version_quad,
                                     arch,
                                     [],
                                     False)
    CRXGen.RunCRXGen(options.chrome_path, parent_dir, options.prev_priv_key)
function_tokens: def BuildArchCRXForComponentUpdater ( version_quad , arch , lib_overrides , options ) : parent_dir , target_dir = PnaclDirs . OutputArchDir ( arch ) StepBanner ( 'BUILD ARCH CRX %s' % arch , 'Packaging for arch %s in %s' % ( arch , target_dir ) ) # Copy llc and ld. copytree_existing ( PnaclDirs . SandboxedCompilerDir ( arch ) , target_dir ) # Rename llc.nexe to llc, ld.nexe to ld for tool in ( 'llc' , 'ld' ) : shutil . move ( J ( target_dir , '%s.nexe' % tool ) , J ( target_dir , tool ) ) # Copy native libraries. copytree_existing ( PnaclDirs . LibDir ( arch ) , target_dir ) # Also copy files from the list of overrides. if arch in lib_overrides : for override in lib_overrides [ arch ] : logging . info ( 'Copying override %s to %s' % ( override , target_dir ) ) shutil . copy2 ( override , target_dir ) # Skip the CRX generation if we are only building the unpacked version # for commandline testing. if options . unpacked_only : return # Generate manifest one level up (to have layout look like the "all" package). # NOTE: this does not have 'web_accessible_resources' and does not have # the all_host_permissions, since it isn't used via chrome-extension:// # URL requests. PnaclPackaging . GenerateManifests ( parent_dir , version_quad , arch , [ ] , False ) CRXGen . RunCRXGen ( options . chrome_path , parent_dir , options . prev_priv_key )