Your IP : 3.146.255.135


Current Path : /opt/alt/alt-nodejs6/root/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/
Upload File :
Current File : //opt/alt/alt-nodejs6/root/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.pyo

�
�Rac@s�dZddlZddlZidd6dd6dd6dd	6Zd
�Zd�Zd�Zd
�Zd�Zd�Z	d�Z
dS(s8Utility functions shared amongst the Windows generators.i����Ntexet
executabletdlltloadable_moduletshared_librarytlibtstatic_librarycCsstjjtjjt��}tjjtjj|dd��}tjj|dd�}tjj|d�}|S(s/Returns the path of the large_pdb_shim.cc file.s..tdatatwinslarge-pdb-shim.cc(tostpathtabspathtdirnamet__file__tjoin(tthis_dirtsrc_dirtwin_data_dirtlarge_pdb_shim_cc((sj/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/MSVSUtil.pyt_GetLargePdbShimCcPaths
$cCsDi}x7|D]/}||kr%q
ntj||�||<q
W|S(s-Performs a partial deep-copy on |in_dict|, only copying the keys in |keys|.

  Arguments:
    in_dict: The dictionary to copy.
    keys: The keys to be copied. If a key is in this list and doesn't exist in
        |in_dict| this is not an error.
  Returns:
    The partially deep-copied dictionary.
  (tcopytdeepcopy(tin_dicttkeystdtkey((sj/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/MSVSUtil.pyt_DeepCopySomeKeyss

cCs7|jdd�}d|d|f|d<dj|�S(s�Add a suffix to the end of a target.

  Arguments:
    name: name of the target (foo#target)
    suffix: the suffix to be added
  Returns:
    Target name with suffix added (foo_suffix#target)
  t#is%s_%si(trsplitR(tnametsuffixtparts((sj/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/MSVSUtil.pyt_SuffixName/s	cCst|t|��S(s�Add a shard number to the end of a target.

  Arguments:
    name: name of the target (foo#target)
    number: shard number
  Returns:
    Target name with shard added (foo_1#target)
  (R tstr(Rtnumber((sj/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/MSVSUtil.pyt
_ShardName=s	cCs]i}x=|D]5}t||jdd��}|r
|||<q
q
Wg}x[|D]S}||kr�x>t||�D]}|jt||��qvWqS|j|�qSWi}x�|D]�}||kr�x�t||�D]�}t||�}tj||�||<t||d|�||d<||jdg�}	g}
x5t|t|	�||�D]}|
j|	|�q^W|
||d<q�Wq�||||<q�Wx�|D]�}x�dD]�}tj||j|g��}
g}x[|
D]S}||kr,x>t||�D]}|jt||��q	Wq�|j|�q�W||||<q�Wq�W||fS(sShard some targets apart to work around the linkers limits.

  Arguments:
    target_list: List of target pairs: 'base/base.gyp:base'.
    target_dicts: Dict of target properties keyed on target pair.
  Returns:
    Tuple of the new sharded versions of the inputs.
  t
msvs_shardittarget_nametsourcestdependenciestdependencies_original(R'R((tinttgettrangetappendR#Rtlen(ttarget_listttarget_dictsttargets_to_shardtttshardstnew_target_listtitnew_target_dictsRR&tnew_sourcestpostdeptypeR'tnew_dependenciesR((sj/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/MSVSUtil.pytShardTargetsIsH



#


c	Cs�|d|}|jdi�}|jdi�}|jd�}|rK|S|jdi�}|jdd
�}|ry|S|jd|d�}d	|t|d
f}|dd|}|S(s�Returns the path to the PDB file that will be generated by a given
  configuration.

  The lookup proceeds as follows:
    - Look for an explicit path in the VCLinkerTool configuration block.
    - Look for an 'msvs_large_pdb_path' variable.
    - Use '<(PRODUCT_DIR)/<(product_name).(exe|dll).pdb' if 'product_name' is
      specified.
    - Use '<(PRODUCT_DIR)/<(target_name).(exe|dll).pdb'.

  Arguments:
    target_dict: The target dictionary to be searched.
    config_name: The name of the configuration of interest.
    vars: A dictionary of common GYP variables with generator-specific values.
  Returns:
    The path of the corresponding PDB file.
  tconfigurationst
msvs_settingstVCLinkerTooltProgramDatabaseFilet	variablestmsvs_large_pdb_pathtproduct_nameR%s	%s.%s.pdbttypetPRODUCT_DIRt/N(t
setdefaultR*tNonetTARGET_TYPE_EXT(	ttarget_dicttconfig_nametvarstconfigtmsvstlinkertpdb_pathR?tpdb_base((sj/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/MSVSUtil.pyt_GetPdbPath�scCs�g}xC|D];}||}t|jdd��s;q
n|j|�q
Wt�}xo|D]g}||}|jd�}t|dddg�}d}	|d|	}
t||	�}tjj|�}|d	d
|
}
|
d
|}t	j
|�}|
|d<d|d<|g|d
<i|
d6|gd6g|d<d}|d|}t||�}t	j
|�}||d<d|d<|g|d
<|g|d<x�|jd�j�D]�\}}t|||�}x'dddgD]}|j
|d �q�W|jdi�}|jdi�}d|d<||d<|d|}|jdi�}|jdi�}d|d<||d<q�W|jd|�|jd|�|||<|||<|jdg�j|�q\W||fS(!s�Insert a shim target that forces the linker to use 4KB pagesize PDBs.

  This is a workaround for targets with PDBs greater than 1GB in size, the
  limit for the 1KB pagesize PDBs created by the linker by default.

  Arguments:
    target_list: List of target pairs: 'base/base.gyp:base'.
    target_dicts: Dict of target properties keyed on target pair.
    vars: A dictionary of common GYP variables with generator-specific values.
  Returns:
    Tuple of the shimmed version of the inputs.
  tmsvs_large_pdbiR%R;tdefault_configurationttoolsettlarge_pdb_copyt_tSHARED_INTERMEDIATE_DIRRDtnoneRBR&tdestinationtfilestcopiestlarge_pdb_shimRR'tmsvs_precompiled_headertmsvs_precompiled_sourcettestR<tVCCLCompilerToolt3tDebugInformationFormattProgramDataBaseFileNameR=ttruetGenerateDebugInformationR>N(R)R*R,RRR R	R
tbasenameRRt	iteritemsRPtpopRFREtinsert(R.R/RJttargets_to_shimR1RHRR%t	base_dicttcopy_suffixtcopy_target_nametfull_copy_target_nametshim_cc_basenametshim_cc_dirtshim_cc_patht	copy_dicttshim_suffixtshim_target_nametfull_shim_target_namet	shim_dictRIRKRNRRLtcompilerRM((sj/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/MSVSUtil.pytInsertLargePdbShims�sh

	








"




(t__doc__RR	RGRRR R#R:RPRw(((sj/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/MSVSUtil.pyt<module>s
						7	(

?>