HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /proc/1991108/root/usr/lib/python3/dist-packages/gyp/__pycache__/
Upload File :
Current File : //proc/1991108/root/usr/lib/python3/dist-packages/gyp/__pycache__/MSVSSettings.cpython-311.pyc
�

K��b˰�	�#�dZddlmZddlZddlZ	en
#e$reZYnwxYwiZiZ	iZ
iZGd�de��Z
d�Zd�ZGd�d	e��ZGd
�de��ZGd�d
e��ZGd�de��ZGd�de��ZGd�de��Ze��Ze��Ze��Ze��Ze��Ze��Ze��Ze��Zegd���Zd�Zd�Z d�Z!d�Z"d�Z#d�Z$d�Z%d�Z&dZ'ej(dd�)e'��z��Z*ej(d ��Z+ej,fd!�Z-d"�Z.d#�Z/ej,fd$�Z0ej,fd%�Z1ej,fd&�Z2d'�Z3e
d(d)��Z4e
d*d+��Z5e
d,d-��Z6e
d.d/��Z7e
d0d1��Z8e
d2d3��Z9e
d4d4��Z:ee4��ee5��ee6��ee7��ee8��ee9��ee:��ie	d5<ie	d6<ie	d7<ee4d8e��ee4d9e��ee4d:e��ee4d;e��ee4d<e��ee4d=e��ee4d>e��ee4d?e��ee4d@e��ee4dAe��ee4dBe��ee4dCe��ee4dDe��ee4dEe��ee4dFe��ee4dGe��ee4dHe��ee4dIe��ee4dJe��ee4dKe��ee4dLe��ee4dMe��ee4dNe��ee4dOe��ee4dPe��ee4dQe��ee4dRe��ee4dSe��ee4dTe��ee4dUe��ee4dVe��ee4dWe��ee4dXe��ee4dYe��ee4dZegd[�����ee4d\egd]�����ee4d^egd_�����ee4d`egda�����ee4dbegdc�����ee4ddegde�����ee4dfegdg�����ee4dhegdi�djg�k����ee4dlegdm�dng�k����ee4doegdp�����ee4dqegdr�����ee4dsegdt�dug�k����ee4dvegdw�����ee4dxegdy�����ee4dzegd{�����ee4d|egd}�d~g�k����e e4dd�e��e e4d�d�e��e e4d�d�e��e e4d�d�e��e e4d�d�e��e e4d�d�e��e e4d�d�e��e e4d�d�egd������e e4d�d�e��e%e4d�d���e#e4d�e��e#e4d�e��e$e4d�e��e$e4d�egd�d�g�k����e$e4d�e��e$e4d�e��e$e4d�e��e$e4d�e��e$e4d�e��e$e4d�e��e$e4d�e��e&e4d���ee5d�e��ee5d�e��ee5d�e��ee5d9e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5dRe��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��ee5d�e��egdעd�g�k��Z;egd٢��Z<ee5d�egdۢ����ee5d�egdݢ����ee5d�egdߢ����ee5d�egd�����ee5d�egd�����ee5d�egd�����ee5d�egd�gd��k����ee5d�e;��ee5d�e<��ee5d�egd�����ee5d�e��ee5d�e��e e5dhd�egd�d�g�k����e e5d�d�e��e e5d�d�e��e e5d�d�e��e!e5d�d5e��e!e5d�d5e��e!e5d�d5e��e!e5d�d6e��e!e5d�d6e��e#e5d�e��e#e5d�e��e$e5d�e��e$e5d�e��e$e5d�e��e$e5d�e��e$e5�de��e$e5�de��e$e5d�e��e$e5�de��e$e5�de��e$e5�de��e$e5�degg�d��k����e$e5�degg�d��k����e$e5�d	egg�d
��k����ee7d9e��ee7d8e��ee7�de�d��
����ee7dHe��ee7dLe��ee7�de��ee7d�e��ee7dRe��ee7dUe��e$e7�de��e$e7d�e��ee6d8e��ee6d9e��ee6�de��ee6�de��ee6�de��ee6�de��ee6�de��ee6�de��ee6�de��ee6�de��ee6�de��ee6dHe��ee6�de��ee6�de��ee6�de��ee6dLe��ee6�de��ee6�de��ee6dRe��ee6�de��ee6dUe��ee6d�e��ee6�deg�d �����ee6�d!eg�d"�����ee6�d#eg�d$�����ee6dzeg�d%�����ee6d|eg�d&�����e e6�d'�d(e��e e6�d)�d*e��e$e6�d+e��e$e6�d,e��e$e6�d-eg�d.�d/g�k����e$e6�d0eg�d.�d/g�k����e$e6�d1e��e$e6�d2e��e$e6�d3e��e$e6d�e��e$e6�d4eg�d5�d6g�k����ee8d�e��ee8d�e��ee8d9e��ee8�d7e��ee8d�e��ee8d�e��ee8d�e��ee8d�e��ee8d�e��ee8dRe��ee8d�e��ee8d�e��ee8d�e<��e!e8d�d6e��e$e8�d8e��e$e8dhegg�d9��k����e$e8d�e��e$e8�d:e��e$e8�d;e��e$e8d�e;��e$e8d�e��e$e8�d<e��e$e8�d=e��ee9�d>e��ee9d9e��ee9�d?e��ee9�d@e��ee9�dAe��ee9�dBe��ee9�dCe��ee9�dDe��ee9�dEe��ee9dRe��ee9d�e��ee9�dFe��ee9�dGe��ee9�dHe��e"e9�dId7�de��e!e9�dJd5e��e#e9�dKe��e#e9�dLe��e#e9d�e��e$e9�dMe��e$e9�dNe��e$e9�dOe��e$e9�dPe��e$e9�dQe��e$e9d�e��ee:�dRe��dS(Sa9Code to validate and convert settings of the Microsoft build tools.

This file contains code to validate and convert settings of the Microsoft
build tools.  The function ConvertToMSBuildSettings(), ValidateMSVSSettings(),
and ValidateMSBuildSettings() are the entry points.

This file was created by comparing the projects created by Visual Studio 2008
and Visual Studio 2010 for all available settings through the user interface.
The MSBuild schemas were also considered.  They are typically found in the
MSBuild install directory, e.g. c:\Program Files (x86)\MSBuild
�)�print_functionNc��eZdZdZd�ZdS)�_Toolz�Represents a tool used by MSVS or MSBuild.

  Attributes:
      msvs_name: The name of the tool in MSVS.
      msbuild_name: The name of the tool in MSBuild.
  c�"�||_||_dS�N)�	msvs_name�msbuild_name)�selfrr	s   �2/usr/lib/python3/dist-packages/gyp/MSVSSettings.py�__init__z_Tool.__init__3s���D�N�$�D����N)�__name__�
__module__�__qualname__�__doc__r�r
rrr+s-��������%�%�%�%�%r
rc��it|j<it|j<it|j<|jt
|j<dS)z�Adds a tool to the four dictionaries used to process settings.

  This only defines the tool.  Each setting also needs to be added.

  Args:
    tool: The _Tool object to be added.
  N)�_msvs_validatorsr�_msbuild_validatorsr	�_msvs_to_msbuild_converters�_msbuild_name_of_tool)�tools r�_AddToolr8sB��&(��4�>�"�+-��d�'�(�02��d�n�-�*.�*;����'�'�'r
c�8�|�|ji��S)z:Returns an MSBuild tool dictionary.  Creates it if needed.��
setdefaultr	)�msbuild_settingsrs  r�_GetMSBuildToolSettingsrFs��	�	$�	$�T�%6��	;�	;�;r
c�$�eZdZdZd�Zd�Zd�ZdS)�_TypezType of settings (Base class).c��dS)z�Verifies that the value is legal for MSVS.

    Args:
      value: the value to check for this type.

    Raises:
      ValueError if value is not valid for MSVS.
    Nr�r
�values  r�ValidateMSVSz_Type.ValidateMSVSN����r
c��dS)z�Verifies that the value is legal for MSBuild.

    Args:
      value: the value to check for this type.

    Raises:
      ValueError if value is not valid for MSBuild.
    Nrr"s  r�ValidateMSBuildz_Type.ValidateMSBuildXr%r
c��|S)z�Returns the MSBuild equivalent of the MSVS value given.

    Args:
      value: the MSVS value to convert.

    Returns:
      the MSBuild equivalent.

    Raises:
      ValueError if value is not valid.
    rr"s  r�ConvertToMSBuildz_Type.ConvertToMSBuildbs	���Lr
N�rrrrr$r'r)rr
rr r KsG������&�&�����������r
r c�$�eZdZdZd�Zd�Zd�ZdS)�_StringzA setting that's just a string.c�T�t|t��std|z���dS�Nzexpected string; got %r��
isinstance�
basestring�
ValueErrorr"s  rr$z_String.ValidateMSVSt�2���e�Z�(�(�:��0�5�8�9�9�9�:�:r
c�T�t|t��std|z���dSr.r/r"s  rr'z_String.ValidateMSBuildxr3r
c� �t|��Sr��ConvertVCMacrosToMSBuildr"s  rr)z_String.ConvertToMSBuild|s��#�E�*�*�*r
Nr*rr
rr,r,qsG������'�'�:�:�:�:�:�:�+�+�+�+�+r
r,c�$�eZdZdZd�Zd�Zd�ZdS)�_StringListz$A settings that's a list of strings.c��t|t��s't|t��std|z���dSdS�Nzexpected string list; got %r�r0r1�listr2r"s  rr$z_StringList.ValidateMSVS��M���e�Z�(�(�?��E�4�1H�1H�?��5��=�>�>�>�?�?�?�?r
c��t|t��s't|t��std|z���dSdSr;r<r"s  rr'z_StringList.ValidateMSBuild�r>r
c�b�t|t��rd�|D��St|��S)Nc�,�g|]}t|����Srr6)�.0�is  r�
<listcomp>z0_StringList.ConvertToMSBuild.<locals>.<listcomp>�s!��
9�
9�
9�a�&�q�)�)�
9�
9�
9r
)r0r=r7r"s  rr)z_StringList.ConvertToMSBuild�s6���%����-�
9�
9�5�
9�
9�
9�9�
%�e�
,�
,�,r
Nr*rr
rr9r9�sG������,�,�?�?�?�?�?�?�-�-�-�-�-r
r9c�*�eZdZdZd�Zd�Zd�Zd�ZdS)�_Booleanz8Boolean settings, can have the values 'false' or 'true'.c�F�|dkr|dkrtd|z���dSdS)N�true�falsezexpected bool; got %r)r2r"s  r�	_Validatez_Boolean._Validate�s6������5�G�+�+��.��6�7�7�7���+�+r
c�0�|�|��dSr�rJr"s  rr$z_Boolean.ValidateMSVS�����N�N�5�����r
c�0�|�|��dSrrLr"s  rr'z_Boolean.ValidateMSBuild�rMr
c�0�|�|��|SrrLr"s  rr)z_Boolean.ConvertToMSBuild�s���N�N�5�����Lr
N)rrrrrJr$r'r)rr
rrFrF�sV������@�@�8�8�8�����������r
rFc�,�eZdZdZdd�Zd�Zd�Zd�ZdS)	�_IntegerzInteger settings.�
c�H�t�|��||_dSr)r r�
_msbuild_base)r
�msbuild_bases  rrz_Integer.__init__�s"��	�N�N�4����%�D���r
c�0�|�|��dSr�r)r"s  rr$z_Integer.ValidateMSVS�������%� � � � � r
c�0�t||j��dSr)�intrTr"s  rr'z_Integer.ValidateMSBuild�s����t�!�"�"�"�"�"r
c�D�|jdkrdpd}|t|��zS)NrRz%dz0x%04x)rTrZ)r
r#�msbuild_formats   rr)z_Integer.ConvertToMSBuild�s*���(�B�.�8�D�D�H�N��C��J�J�&�&r
N)rR�rrrrrr$r'r)rr
rrQrQ�s[��������&�&�&�&�!�!�!�#�#�#�'�'�'�'�'r
rQc�,�eZdZdZdd�Zd�Zd�Zd�ZdS)�_Enumerationa�Type of settings that is an enumeration.

  In MSVS, the values are indexes like '0', '1', and '2'.
  MSBuild uses text labels that are more representative, like 'Win32'.

  Constructor args:
    label_list: an array of MSBuild labels that correspond to the MSVS index.
        In the rare cases where MSVS has skipped an index value, None is
        used in the array to indicate the unused spot.
    new: an array of labels that are new to MSBuild.
  Nc��t�|��||_td�|D����|_|�|j�|��dSdS)Nc3�K�|]}|�|V��	dSrr)rBr#s  r�	<genexpr>z(_Enumeration.__init__.<locals>.<genexpr>�s3����5�5��"'�"3� %�"3�"3�"3�"3�5�5r
)r r�_label_list�set�_msbuild_values�update)r
�
label_list�news   rrz_Enumeration.__init__�sr��	�N�N�4����!�D���5�5�*�5�5�5�5�5�D��
��
��!�!�#�&�&�&�&�&��r
c�0�|�|��dSrrWr"s  rr$z_Enumeration.ValidateMSVS�rXr
c�<�||jvrtd|z���dS)Nz unrecognized enumerated value %s)rer2r"s  rr'z_Enumeration.ValidateMSBuild�s,���D�(�(�(��9�E�A�B�B�B�)�(r
c���t|��}|dks|t|j��kr&td|t|j��fz���|j|}|�td|z���|S)Nrz.index value (%d) not in expected range [0, %d)z%converted value for %s not specified.)rZ�lenrcr2)r
r#�index�labels    rr)z_Enumeration.ConvertToMSBuild�s�����J�J�E��q�y�y�E�S��!1�2�2�2�2��G��s�4�#3�4�4�5�6�
7�
7�7���U�#�E��}��>��F�G�G�G��Lr
rr]rr
rr_r_�sb������
�
�'�'�'�'�!�!�!�C�C�C�����r
r_)�rIrHc�*�t||||��dS)z�Defines a setting that has the same name in MSVS and MSBuild.

  Args:
    tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
    name: the name of the setting.
    setting_type: the type of this setting.
  N)�_Renamed)r�name�setting_types   r�_Samert�s���4��t�\�*�*�*�*�*r
c��������fd�}�jt�j|<�jt�j�<|t�j|<dS)aDefines a setting for which the name has changed.

  Args:
    tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
    msvs_name: the name of the MSVS setting.
    msbuild_name: the name of the MSBuild setting.
    setting_type: the type of this setting.
  c�X��t|���}��|��|�<dSr)rr))r#r�msbuild_tool_settingsr	rsrs   ���r�
_Translatez_Renamed.<locals>._Translates3���3�4D�d�K�K��*6�*G�*G��*N�*N��,�'�'�'r
N)r$rrr'rr	r)rrr	rsrxs` `` rrqrq�sv�����O�O�O�O�O�O�O�1=�0I��4�>�"�9�-��"��d�'�(��6�;E��d�n�-�i�8�8�8r
c�,�t|||||��dSr)�_MovedAndRenamed)r�
settings_name�msbuild_tool_namerss    r�_Movedr}s*���4��(9�=��!�!�!�!�!r
c��������fd�}�jt|j|<�j}|t��<|t
|j|<dS)aDefines a setting that may have moved to a new section.

  Args:
    tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
    msvs_settings_name: the MSVS name of the setting.
    msbuild_tool_name: the name of the MSBuild tool to place the setting under.
    msbuild_settings_name: the MSBuild name of the setting.
    setting_type: the type of this setting.
  c�d��|��i��}��|��|�<dSr)rr))r#r�
tool_settings�msbuild_settings_namer|rss   ���rrxz$_MovedAndRenamed.<locals>._Translate!s8���$�/�/�0A�2�F�F�M�+7�+H�+H��+O�+O�M�'�(�(�(r
N)r$rrr'rr)r�msvs_settings_namer|r�rsrx�	validators  ```  rrzrzs|�����P�P�P�P�P�P�P�
���4�>�"�#5�6��*�)�BK��'�(�)>�?�DN��d�n�-�.@�A�A�Ar
c�j�d�}|jt|j|<|t|j|<dS)z�Defines a setting that is only found in MSVS.

  Args:
    tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
    name: the name of the setting.
    setting_type: the type of this setting.
  c��dSrr)�unused_value�unused_msbuild_settingss  rrxz_MSVSOnly.<locals>._Translate5s���Dr
N)r$rrr�rrrrsrxs    r�	_MSVSOnlyr�,s@��	�	�	�,8�+D��4�>�"�4�(�6@��d�n�-�d�3�3�3r
c�t�����fd�}|jt�j�<|t�j�<dS)z�Defines a setting that is only found in MSBuild.

  Args:
    tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
    name: the name of the setting.
    setting_type: the type of this setting.
  c�H��|��ji��}||�<dSrr)r#rr�rrrs   ��rrxz _MSBuildOnly.<locals>._TranslateFs+���$�/�/��0A�2�F�F�M��M�$���r
N)r'rr	rrr�s``  r�_MSBuildOnlyr�=sR���� � � � � � �
2>�1M��d�'�(��.�6@��d�n�-�d�3�3�3r
c�~�����fd�}tjt�j|<|t�j|<dS)a+Defines a setting that's handled via a command line option in MSBuild.

  Args:
    tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
    msvs_name: the name of the MSVS setting that if 'true' becomes a flag
    flag: the flag to insert at the end of the AdditionalOptions
  c�j��|dkr+t|���}d|vr|d�d���}n�}||d<dSdS)NrH�AdditionalOptions� )r)r#rr��	new_flags�flagrs    ��rrxz0_ConvertedToAdditionalOption.<locals>._TranslateXs^�������-�.>��E�E�m�	�
�	-�	-�,�-@�A�A�A�4�4�H�	�	��	�+4�m�'�(�(�(�
�r
N)�_booleanr$rrr)rrr�rxs` ` r�_ConvertedToAdditionalOptionr�OsQ����5�5�5�5�5�5�19�0E��4�>�"�9�-�;E��d�n�-�i�8�8�8r
c�����fd�}tgd���j}|t�j|<tj}t�j}||d<||d<|t�j|<dS)Nc���t|���}|dkrd|d<d|d<dS|dkrd|d<d|d<dS|dkrd|d<d|d<dStd|z���)	N�0rI�PreprocessToFile�PreprocessSuppressLineNumbers�1rH�2z&value must be one of [0, 1, 2]; got %s)rr2)r#rr�rs   �rrxz3_CustomGeneratePreprocessedFile.<locals>._Translatees����+�,<�d�C�C�M���|�|�*1�m�&�'�7>�m�3�4�4�4�	�#���*0�m�&�'�7>�m�3�4�4�4�	�#���*0�m�&�'�7=�m�3�4�4�4��?�%�G�H�H�Hr
)�a�b�cr�r�)	r_r$rrr�r'rr	r)rrrx�msvs_validator�msbuild_validator�msbuild_tool_validatorss`     r�_CustomGeneratePreprocessedFiler�ds����I�I�I�I�I� ����0�0�=�.�0>��4�>�"�9�-��.��/��0A�B��0A��,�-�=N��9�:�;E��d�n�-�i�8�8�8r
)�IntDir�OutDirz(\$\((?:%s)\))(?:[\\/]+)�|z^(.*)_excluded$c��d}tjt|��}|r|�d��}||v}|rt	||���dSdS)a�Verify that 'setting' is valid if it is generated from an exclusion list.

  If the setting appears to be generated from an exclusion list, the root name
  is checked.

  Args:
      setting:   A string that is the setting name to validate
      settings:  A dictionary where the keys are valid settings
      error_msg: The message to emit in the event of error
      stderr:    The stream receiving the error messages.
  T���fileN)�re�match�_EXCLUDED_SUFFIX_RE�group�print)�setting�settings�	error_msg�stderr�unrecognized�m�root_settings       r�_ValidateExclusionSettingr��sg���,��h�"�G�,�,�!��0��7�7�1�:�:�L��x�/�L��"�	�)�&�!�!�!�!�!�!�"�"r
c�D�d|vrt�d|��}|S)aReplace macros which have excessive following slashes.

  These macros are known to have a built-in trailing slash. Furthermore, many
  scripts hiccup on processing paths with extra slashes in the middle.

  This list is probably not exhaustive.  Add as needed.
  �$z\1)�fix_vc_macro_slashes_regex�sub)�ss r�FixVCMacroSlashesr��s'��	�A�X�X�"�&�&�u�a�0�0�A�	
�(r
c
��d|vrKdddddddd	dd
�	}|���D]\}}|�||��}�t|��}|S)z�Convert the MSVS macros found in the string to the MSBuild equivalent.

  This list is probably not exhaustive.  Add as needed.
  r�z$(Configuration)z%(RelativeDir)z%(Extension)z%(Filename)%(Extension)z%(Filename)z%(Identity)z$(ProjectFileName)z$(Platform))	z$(ConfigurationName)z$(InputDir)z$(InputExt)z$(InputFileName)z$(InputName)z$(InputPath)z
$(ParentName)z$(PlatformName)z$(SafeInputName))�items�replacer�)r��replace_map�oldrhs    rr7r7�s|��
	�A�X�X� 2�'�%�5�%�%�-�(�)�
�
�K� �%�%�'�'�����S�
�)�)�C��
�
�a�a��!���A�	
�(r
c��i}|���D]�\}}|tvr�t|}|���D]g\}}||vrE	||||���#t$r$}td|�d|�d|��|���Yd}~�Fd}~wwxYwt	||d|�d|�d�|���h��td|z|�����|S)	a�Converts MSVS settings (VS2008 and earlier) to MSBuild settings (VS2010+).

  Args:
      msvs_settings: A dictionary.  The key is the tool name.  The values are
          themselves dictionaries of settings and their values.
      stderr: The stream receiving the error messages.

  Returns:
      A dictionary of MSBuild settings.  The key is either the MSBuild tool name
      or the empty string (for the global settings).  The values are themselves
      dictionaries of settings and their values.
  zWarning: while converting �/z
 to MSBuild, r�N�Warning: unrecognized setting z while converting to MSBuild.z:Warning: unrecognized tool %s while converting to MSBuild.)r�rr2r�r�)	�
msvs_settingsr�r�msvs_tool_name�msvs_tool_settings�	msvs_tool�msvs_setting�
msvs_value�es	         r�ConvertToMSBuildSettingsr��sq����,9�,?�,?�,A�,A�C�C�(�n�(��4�4�4�-�n�=�i�&8�&>�&>�&@�&@�,�,�
"�,�
��9�$�$�+�#�I�l�#�J�0@�A�A�A�A���+�+�+��E�&4�n�n�l�l�l�A�A�G�#)�
+�
+�
+�
+�
+�
+�
+�
+�
+�����+����
$�L�$-�I�'5�n�n�l�l�l�&D�%+�,�,�,�,�,�"�#�%3�4�;A�C�C�C�C�C�	�s�A#�#
B�-B�Bc�2�tt||��dS)aValidates that the names of the settings are valid for MSVS.

  Args:
      settings: A dictionary.  The key is the tool name.  The values are
          themselves dictionaries of settings and their values.
      stderr: The stream receiving the error messages.
  N)�_ValidateSettingsr�r�r�s  r�ValidateMSVSSettingsr��s���$�h��7�7�7�7�7r
c�2�tt||��dS)aValidates that the names of the settings are valid for MSBuild.

  Args:
      settings: A dictionary.  The key is the tool name.  The values are
          themselves dictionaries of settings and their values.
      stderr: The stream receiving the error messages.
  N)r�rr�s  r�ValidateMSBuildSettingsr��s���'��6�:�:�:�:�:r
c�R�|D]�}||vr�||}||���D]e\}}||vrD	|||���#t$r$}td|�d|�d|��|���Yd}~�Ed}~wwxYwt||d|�d|��|���f��td|z|�����dS)a�Validates that the settings are valid for MSBuild or MSVS.

  We currently only validate the names of the settings, not their values.

  Args:
      validators: A dictionary of tools and their validators.
      settings: A dictionary.  The key is the tool name.  The values are
          themselves dictionaries of settings and their values.
      stderr: The stream receiving the error messages.
  z
Warning: for r�z, r�Nr�zWarning: unrecognized tool %s)r�r2r�r�)�
validatorsr�r��	tool_name�tool_validatorsr�r#r�s        rr�r��sP���H�H�i��J���"�9�-�o�$�Y�/�5�5�7�7�,�,�.�'�5��o�%�%�E�$�O�G�$�U�+�+�+�+���E�E�E��E�(�y�y�'�'�'�1�1�6�=C�
E�
E�
E�
E�
E�
E�
E�
E�
E�����E����$�G�$3�O�&/�i�i���&:�$*�	,�,�,�,�,��
,�y�
8��G�G�G�G�G�%H�Hs�A�
A5�A0�0A5�VCCLCompilerTool�	ClCompile�VCLinkerTool�Link�
VCMIDLTool�Midl�VCResourceCompilerTool�ResourceCompile�VCLibrarianTool�Lib�VCManifestTool�Manifest�MASMro�ProjectReference�ManifestResourceCompile�AdditionalIncludeDirectoriesr��AdditionalUsingDirectories�AssemblerListingLocation�BrowseInformationFile�BufferSecurityCheck�DisableLanguageExtensions�DisableSpecificWarnings�EnableFiberSafeOptimizations�
EnablePREfast�ExpandAttributedSource�FloatingPointExceptions�ForceConformanceInForLoopScope�ForcedIncludeFiles�ForcedUsingFiles�GenerateXMLDocumentationFiles�IgnoreStandardIncludePath�MinimalRebuild�OmitDefaultLibName�OmitFramePointers�PreprocessorDefinitions�ProgramDataBaseFileName�RuntimeTypeInfo�ShowIncludes�SmallerTypeCheck�
StringPooling�SuppressStartupBanner�TreatWChar_tAsBuiltInType�"UndefineAllPreprocessorDefinitions�UndefinePreprocessorDefinitions�UseFullPaths�WholeProgramOptimization�XMLDocumentationFileName�CompileAsWinRT�AssemblerOutput)�	NoListing�AssemblyCode�All�AssemblyAndMachineCode�AssemblyAndSourceCode�BasicRuntimeChecks)�Default�StackFrameRuntimeCheck�UninitializedLocalUsageCheck�EnableFastChecks�BrowseInformation)rIrHrH�CallingConvention)�Cdecl�FastCall�StdCall�
VectorCall�	CompileAs)r�
CompileAsC�CompileAsCpp�DebugInformationFormat)ro�OldStyleN�ProgramDatabase�EditAndContinue�EnableEnhancedInstructionSet)�NotSet�StreamingSIMDExtensions�StreamingSIMDExtensions2�AdvancedVectorExtensions�NoExtensions�AdvancedVectorExtensions2�ErrorReporting)�None�Prompt�Queue�Send)rh�ExceptionHandling)rI�Sync�Async�
SyncCThrow�FavorSizeOrSpeed)�Neither�Speed�Size�FloatingPointModel)�Precise�Strict�Fast�InlineFunctionExpansion)r�OnlyExplicitInline�AnySuitable�Disabled�Optimization)r:�MinSpace�MaxSpeed�Full�RuntimeLibrary)�
MultiThreaded�MultiThreadedDebug�MultiThreadedDLL�MultiThreadedDebugDLL�StructMemberAlignment)r�1Byte�2Bytes�4Bytes�8Bytes�16Bytes�WarningLevel)�TurnOffAllWarnings�Level1�Level2�Level3�Level4�EnableAllWarnings�EnableFunctionLevelLinking�FunctionLevelLinking�EnableIntrinsicFunctions�IntrinsicFunctions�KeepComments�PreprocessKeepComments�
ObjectFile�ObjectFileName�OpenMP�
OpenMPSupport�PrecompiledHeaderThrough�PrecompiledHeaderFile�PrecompiledHeaderOutputFile�UsePrecompiledHeader�PrecompiledHeader)�NotUsing�Create�Use�WarnAsError�TreatWarningAsError�DefaultCharIsUnsignedz/J�Detect64BitPortabilityProblems�UseUnicodeResponseFiles�
BuildingInIDE�CompileAsManagedrIrH�CreateHotpatchableImage�MultiProcessorCompilation�PreprocessOutputPath�ProcessorNumber�TrackerLogDirectory�TreatSpecificWarningsAsErrors�UseUnicodeForAssemblerListing�GeneratePreprocessedFile�AdditionalDependencies�AdditionalLibraryDirectories�AdditionalManifestDependencies�AddModuleNamesToAssembly�AllowIsolation�AssemblyLinkResource�BaseAddress�CLRUnmanagedCodeCheck�
DelayLoadDLLs�	DelaySign�EmbedManagedResourceFile�	EnableUAC�EntryPointSymbol�ForceSymbolReferences�
FunctionOrder�GenerateDebugInformation�GenerateMapFile�HeapCommitSize�HeapReserveSize�IgnoreAllDefaultLibraries�IgnoreEmbeddedIDL�
ImportLibrary�KeyContainer�KeyFile�ManifestFile�
MapExports�MapFileName�MergedIDLBaseFileName�
MergeSections�MidlCommandFile�ModuleDefinitionFile�
OutputFile�PerUserRedirection�Profile�ProfileGuidedDatabase�ProgramDatabaseFile�RegisterOutput�SetChecksum�StackCommitSize�StackReserveSize�StripPrivateSymbols�SupportUnloadOfDelayLoadedDLL�
SwapRunFromCD�TurnOffAssemblyGeneration�TypeLibraryFile�TypeLibraryResourceID�UACUIAccess�Version�EnableCOMDATFolding�FixedBaseAddress�LargeAddressAware�OptimizeReferences�RandomizedBaseAddress�TerminalServerAware)	r �Console�Windows�NativezEFI ApplicationzEFI Boot Service DriverzEFI ROMzEFI Runtime�	WindowsCE�POSIX)r �
MachineX86N�
MachineARM�
MachineEBC�MachineIA64N�MachineMIPS�
MachineMIPS16�MachineMIPSFPU�MachineMIPSFPU16NNN�
MachineSH4N�MachineTHUMB�
MachineX64�
AssemblyDebug)rorHrI�CLRImageType)r�
ForceIJWImage�ForcePureILImage�ForceSafeILImage�CLRThreadAttribute)�DefaultThreadingAttribute�MTAThreadingAttribute�STAThreadingAttribute�DataExecutionPrevention�Driver)r r��UpOnly�WDM�LinkTimeCodeGeneration)r�UseLinkTimeCodeGeneration�PGInstrument�PGOptimization�PGUpdate�ShowProgress)r �LinkVerbose�LinkVerboseLib)�LinkVerboseICF�LinkVerboseREF�LinkVerboseSAFESEH�LinkVerboseCLR�	SubSystem�
TargetMachine�UACExecutionLevel)�	AsInvoker�HighestAvailable�RequireAdministrator�MinimumRequiredVersion�TreatLinkerWarningAsErrors�LinkErrorReporting)�
NoErrorReport�PromptImmediately�QueueForNextLogin�SendErrorReport�IgnoreDefaultLibraryNames�IgnoreSpecificDefaultLibraries�ResourceOnlyDLL�NoEntryPoint�SwapRunFromNet�SwapRunFromNET�GenerateManifest�IgnoreImportLibrary�LinkIncremental�LinkLibraryDependencies�UseLibraryDependencyInputs�OptimizeForWindows98�ImageHasSafeExceptionHandlers�LinkDLL�
LinkStatus�PreventDllBinding�SupportNobindOfDelayLoadedDLL�MSDOSStubFileName�SectionAlignment�SpecifySectionAttributes�ForceFileOutput)�Enabled�MultiplyDefinedSymbolOnly�UndefinedSymbolOnly�CreateHotPatchableImage)r��X86Image�X64Image�ItaniumImage�CLRSupportLastError)r�r:�
SystemDlls�Culture�)rU�ResourceOutputFileName�NullTerminateStrings�CPreprocessOptions�ErrorCheckAllocations�ErrorCheckBounds�ErrorCheckEnumRange�ErrorCheckRefPointers�ErrorCheckStubData�GenerateStublessProxies�GenerateTypeLibrary�HeaderFileName�InterfaceIdentifierFileName�MkTypLibCompatible�OutputDirectory�
ProxyFileName�RedirectOutputAndErrors�TypeLibraryName�DefaultCharType)�Unsigned�Signed�Ascii�TargetEnvironment)r �Win32�Itanium�X64�EnableErrorChecks)�EnableCustomr'r
)r r�r��4�8)r�r�r��3r�DLLDataFileName�DllDataFileName�ValidateParameters�ValidateAllParameters�ApplicationConfigurationMode�ClientStubFile�GenerateClientFiles�Stubr'�GenerateServerFiles�LocaleID�ServerStubFile�SuppressCompilerWarnings�
TypeLibFormat�	NewFormat�	OldFormat�ExportNamedFunctions�DisplayLibrary)r�r�r�r��Name�
RemoveObjects�TreatLibWarningAsErrors�Verbose�AdditionalManifestFiles�AssemblyIdentity�ComponentFileName�GenerateCatalogFiles�InputResourceManifests�OutputManifestFile�RegistrarScriptFile�ReplacementsFile�UpdateFileHashes�UpdateFileHashesSearchPath�
VerboseOutput�ManifestResourceFile�
EmbedManifest�DependencyInformationFile�UseFAT32Workaround�EnableDPIAwareness�GenerateCategoryTags�ManifestFromManagedAssembly�OutputResourceManifests�SuppressDependencyElement�UseSafeExceptionHandlers)=r�
__future__r�sysr�r1�	NameError�strrrrr�objectrrrr r,r9rFrQr_r��_integer�_string�
_file_name�_folder_name�
_file_list�_folder_list�_string_list�_newly_booleanrtrqr}rzr�r�r�r��fix_vc_macro_slashes_regex_list�compile�joinr�r�r�r�r�r7r�r�r�r��_compile�_link�_midl�_rc�_lib�	_manifest�_masm�_subsystem_enumeration�_target_machine_enumerationrr
r�<module>r_s� ��

�
�&�%�%�%�%�%�
�
�
�
�	�	�	�	���*�*�������*�*�*�����
����
!����
%�
%�
%�
%�
%�F�
%�
%�
%�<�<�<�<�<�<�
#�#�#�#�#�F�#�#�#�L
+�
+�
+�
+�
+�e�
+�
+�
+� -�-�-�-�-�%�-�-�-�&�����u����$'�'�'�'�'�u�'�'�'�(%�%�%�%�%�5�%�%�%�R�8�:�:���8�:�:��
�'�)�)��
�W�Y�Y�
��w�y�y��
�[�]�]�
��{�}�}���{�}�}����3�3�3�4�4��+�+�+�F�F�F�(!�!�!�
O�O�O�.A�A�A�"A�A�A�$F�F�F�*F�F�F�0#7��'�R�Z�����)H� I� I�I����
!�b�j�!2�3�3��DG�:�"�"�"�"�2
�
�
����.47�:�$�$�$�$�N+.�*�8�8�8�8�.1�Z�;�;�;�;�H�H�H�B�5�#�[�1�1��
��n�f�%�%��
��l�F�#�#���e�$�&7�8�8���u�
��&�&���E�"�J�/�/�	�
��f�f����	���������������������
�
�
���������������������B��*,��&�'�13��-�.���h�.��=�=�=���h�#�\�2�2�2���h�,�l�;�;�;���h�*�J�7�7�7���h�'��4�4�4���h�%�x�0�0�0���h�+�X�6�6�6���h�)�<�8�8�8���h�.��9�9�9���h���*�*�*���h�(�(�3�3�3���h�)�8�4�4�4���h�0�(�;�;�;���h�$�j�1�1�1���h�"�J�/�/�/���h�/��:�:�:���h�+�X�6�6�6���h� �(�+�+�+���h�$�h�/�/�/���h�#�X�.�.�.���h�)�<�8�8�8���h�)�:�6�6�6���h�!�8�,�,�,���h���)�)�)���h�"�H�-�-�-���h���*�*�*���h�'��2�2�2���h�+�X�6�6�6���h�4�h�?�?�?���h�1�<�@�@�@���h���)�)�)���h�*�H�5�5�5���h�*�J�7�7�7���h� �(�+�+�+���h�!��l�-�-�-�.�.�/�/�/���h�$��l�(�(�(�)�)�*�*�*�
��h�#��l�����������h�#��l�"�"�"�#�#�$�$�$�
��h���l�$�$�$�%�%�&�&�&���h�(��l�'�'�'�(�(�)�)�)���h�.��l�����������h� ��l�����x�!�!�!�"�"�"�
��h�#��l����%�~�'�'�'�(�(�(�
��h�"��l�����������h�$��l�����������h�)��l�#�#�#�#�|�%�%�%�&�&�&�
��h���l���������
��h� ��l�-�-�-�.�.�/�/�/�
��h�'��l���� � �!�!�!���h���l����
,�,�.�.�.�/�/�/�	���/�1G�	�������-�/C�	�������>�#;�X�F�F�F����<�!1�:�>�>�>����8�_�h�7�7�7����-�/F�	�������*�,I�	�������)�+>�	�����
�
� � � �	���=�"7��B�B�B���X�'>��E�E�E�
�	�(�4�h�?�?�?�	�	�(�-�x�8�8�8�
��X���1�1�1���X�)�
�\�"�7�#)�#+�,�,�,�-�-�-�
��X�0�(�;�;�;���X�2�H�=�=�=���X�-�w�7�7�7���X�(�(�3�3�3���X�,�l�;�;�;���X�6��E�E�E���X�6��A�A�A� ���*D�E�E�E���e�
%�z�2�2�2���e�
+�\�:�:�:���e�
-�z�:�:�:���e�
 �,�/�/�/���e�
'��4�4�4���e�
�x�(�(�(���e�
#�Z�0�0�0���e�]�G�$�$�$���e�
$�h�/�/�/���e�_�j�)�)�)���e�[�(�#�#�#���e�
'��4�4�4���e�[�(�#�#�#���e�
��)�)�)���e�
$�j�1�1�1���e�_�j�)�)�)���e�
'��2�2�2���e�
��)�)�)���e�
�w�'�'�'���e�
��(�(�(���e�
(�(�3�3�3���e�
 �(�+�+�+���e�_�j�)�)�)���e�^�Z�(�(�(���e�Y�
�#�#�#���e�^�Z�(�(�(���e�\�8�$�$�$���e�]�J�'�'�'���e�
$�j�1�1�1���e�_�g�&�&�&���e�
�
�+�+�+���e�
#�Z�0�0�0���e�\�:�&�&�&���e�
!�8�,�,�,���e�Y��!�!�!���e�
$�j�1�1�1���e�
"�J�/�/�/���e�
�x�(�(�(���e�]�H�%�%�%���e�
��(�(�(���e�
��)�)�)���e�
"�J�/�/�/���e�
,�h�7�7�7���e�
$�h�/�/�/���e�_�h�'�'�'���e�
(�(�3�3�3���e�
�
�+�+�+���e�
$�h�/�/�/���e�]�H�%�%�%���e�Y�� � � ���e�
"�N�3�3�3���e�
��0�0�0���e�
 �.�1�1�1���e�
!�>�2�2�2���e�
$�n�5�5�5���e�
"�N�3�3�3�%�����
�	�
�
�
��+�l�������(��e�_��l�����������e�^��l�(�(�(�)�)�*�*�*�
��e�
!��l�-�-�-�.�.�/�/�/���e�
&��l�����������e�X��l���������
��e�
%��l� � � �!�!�"�"�"���e�^��l�&�&�&�*�*�*�+�+�+�,�,�,���e�[�0�1�1�1���e�_�9�:�:�:���e�
 ��l�,�,�,�-�-�.�.�.���e�
%�w�/�/�/���e�
)�8�4�4�4�	��� �"6�	��,�,�,�-�-�
/�
/�
/�0�0�0�
	���+�-M�	�������!�>�8�<�<�<���� �"2�H�=�=�=���u� �"�h�/�/�/���u�#�R��2�2�2���u���^�4�4�4���u�'�);�X�F�F�F���u�*�,>��I�I�I�
�	�%�'��8�8�8�	�	�%�*�H�5�5�5�
��U�O�X�.�.�.���U�3�X�>�>�>���U�I�x�(�(�(���U�L�(�+�+�+���U�'��2�2�2���U�3�X�>�>�>���U�)�<�8�8�8���U�'��4�4�4���U�&��1�1�1���U�.��8�8�8���U�%�
�\�"�#:�#:�#:�;�;�;�<�<�<�

��U�-�
�\�"�#3�#3�#3�4�4�4�5�5�5�

��U�)�
�\�"�#1�#1�#1�2�2�2�3�3�3���c���-�-�-���c�)�<�8�8�8���c�9�h�h�B�/�/�/�0�0�0���c�&��1�1�1���c�$�l�3�3�3���c�#�W�-�-�-���c�>�8�$�$�$���c�"�H�-�-�-���c�,�l�;�;�;�
��S�(�(�3�3�3���S�'��6�6�6���e�
+�\�:�:�:���e�
 �,�/�/�/���e�
!�7�+�+�+���e�
$�h�/�/�/���e�
��*�*�*���e�
"�H�-�-�-���e�
$�h�/�/�/���e�
!�8�,�,�,���e�
&��1�1�1���e�
"�H�-�-�-���e�
�z�*�*�*���e�
(�(�3�3�3���e�
*�J�7�7�7���e�
!�8�,�,�,���e�
��(�(�(���e�
&��5�5�5���e�_�j�)�)�)���e�
&�
�3�3�3���e�
$�h�/�/�/���e�
�
�+�+�+���e�
.��=�=�=���e�]�H�%�%�%���e�
��l�����������e�
 ��l���������
��e�
 ��l�����������e�
$��l�����������e�^��l���������	���!�#4�j�A�A�A����$�&=�	����
��U�2�H�=�=�=���U�$�j�1�1�1���U�)�
�\�"�6�#)�#+�,�,�,�-�-�-�
��U�)�
�\�"�6�#)�#+�,�,�,�-�-�-�
��U�J��)�)�)���U�$�j�1�1�1���U�.��9�9�9���U�)�<�8�8�8���U�O�
�\�"�;�#.�#0�1�1�1�2�2�2���d�$�j�1�1�1���d�*�L�9�9�9���d���.�.�.���d�"�L�1�1�1���d�#�W�-�-�-���d�'��2�2�2���d�,�j�9�9�9���d�"�J�/�/�/���d�L�*�%�%�%���d�#�X�.�.�.���d�%�x�0�0�0���d�$�h�/�/�/���d�O�8�9�9�9���t�
&�(:�H�E�E�E���T�#�W�-�-�-���T�#�
�\�"�#4�#4�#4�5�5�5�6�6�6�

��T�+�W�5�5�5���T�6�:�&�&�&���T�?�J�/�/�/���T�;� 6�7�7�7���T�(�,�7�7�7���T�,�h�7�7�7���T�9�h�'�'�'���i�*�J�7�7�7���i�$�l�3�3�3���i�#�W�-�-�-���i�$�j�1�1�1���i�'��2�2�2���i�)�7�3�3�3���i�%�z�2�2�2���i�&�
�3�3�3���i�#�Z�0�0�0���i�(�(�3�3�3���i�"�J�/�/�/���i�#�X�.�.�.���i�-�z�:�:�:���i��(�+�+�+����2�*�)�������y�/�2�x�0�0�0�
�	�)�0�*�=�=�=�	�	�)�)�8�4�4�4�	�	�)�.��9�9�9�
��Y�,�h�7�7�7���Y�.��9�9�9���Y�5�
������Y�1�7�;�;�;���Y�3�X�>�>�>���Y�-�|�<�<�<���e�
'��2�2�2�2�2s���