����JFIF���������
1#@!#!123s
D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
usr
/
lib64
/
python3.8
/
distutils
/
__pycache__
/
Filename :
unixccompiler.cpython-38.pyc
back
Copy
U ����&�.e�;����������������������@���s����d�Z�ddlZddlZddlZddlmZ�ddlmZ�ddlm Z m Z mZ�ddlm Z mZmZmZ�ddlmZ�ejdkr~ddlZG�d d ��d e �ZdS�)a9��distutils.unixccompiler Contains the UnixCCompiler class, a subclass of CCompiler that handles the "typical" Unix-style command-line C compiler: * macros defined with -Dname[=value] * macros undefined with -Uname * include search directories specified with -Idir * libraries specified with -lllib * library search directories specified with -Ldir * compile handled by 'cc' (or similar) executable with -c option: compiles .c to .o * link static library handled by 'ar' command (possibly with 'ranlib') * link shared library handled by 'cc -shared' �����N)� sysconfig)�newer)� CCompiler�gen_preprocess_options�gen_lib_options)�DistutilsExecError�CompileError�LibError� LinkError)�log�darwinc���������������� �������s����e�Zd�ZdZddgdgdgddgdgddgdd�Zejdd��d krNd ged <�ddd dddgZdZdZ dZ dZdZd�Z �ZZeZejdkr�dZ��fdd�Zd.dd�Zdd��Zd/d d!�Zd0d"d#�Zd$d%��Zd&d'��Zd(d)��Zd*d+��Zd1d,d-�Z���ZS�)2� UnixCCompilerZunixNZccz-sharedZarz-cr)�preprocessor�compiler�compiler_so�compiler_cxx� linker_so� linker_exe�archiver�ranlib����r���r���z.cz.Cz.ccz.cxxz.cppz.mz.oz.az.soz.dylibz.tbdzlib%s%s�cygwinz.exec��������������������s@���t����|||�\}}}t�d�}|r6||kr6|�|��|||fS�)z'Remove standard library path from rpathZLIBDIR)�super� _fix_lib_argsr����get_config_var�remove)�self� libraries�library_dirs�runtime_library_dirsZlibdir�� __class__���//usr/lib64/python3.8/distutils/unixccompiler.pyr���U���s������� zUnixCCompiler._fix_lib_argsc�������������� ���C���s����|���d�||�}|\}}}t||�} |�j| �} |r>| �d|g��|rN|| d�d�<�|r\| �|��| �|��|�js~|d�ks~t||�r�|r�|��tj � |���z|��| ��W�n*�tk r��}�zt |��W�5�d�}~X�Y�nX�d�S�)N�-or���)Z_fix_compile_argsr���r����extend�appendZforcer����mkpath�os�path�dirname�spawnr���r���)r����sourceZoutput_fileZmacrosZinclude_dirs� extra_preargs�extra_postargs� fixed_args�ignore�pp_optsZpp_args�msgr"���r"���r#���� preprocess^���s$���� zUnixCCompiler.preprocessc����������� ��� ���C���sp���|�j�}tjdkr t�|||��}z |��||�|d|g�|���W�n*�tk rj�}�zt|��W�5�d�}~X�Y�nX�d�S�)Nr���r$���)r����sys�platform�_osx_support�compiler_fixupr+���r���r���) r����obj�srcZextZcc_argsr.���r1���r���r2���r"���r"���r#����_compilex���s���� �� zUnixCCompiler._compiler���c�������������� ���C���s����|���||�\}}|�j||d�}|��||�r�|��tj�|���|��|�j|g�|�|�j ���|�j r�z|��|�j |g���W�q��tk r��}�zt|��W�5�d�}~X�Y�q�X�nt �d|��d�S�)N)� output_dir�skipping %s (up-to-date))�_fix_object_args�library_filename� _need_linkr'���r(���r)���r*���r+���r����objectsr���r���r ���r����debug)r���r@���Zoutput_libnamer;���rA����target_lang�output_filenamer2���r"���r"���r#����create_static_lib����s$�������� zUnixCCompiler.create_static_libc�������������� ���C���s���|���||�\}}|��|||�}|\}}}t|�|||�}t|ttd��f�sPtd��|d�k rftj� ||�}|�� ||��r�||�j�|�d|g�}| r�dg|d�d�<�| r�| |d�d�<�|r�|�|��|�� tj�|���z�|tjkr�|�jd�d���}n|�jd�d���}| dk�rr|�j�rrd}tj�|d��dk�r@d}d||�k�r@|d7�}�q&tj�||��d k�r\d}nd}|�j|�|||�<�tjd k�r�t�||�}|��||���W�n,�tk �r��}�zt|��W�5�d�}~X�Y�nX�nt�d|��d�S�)Nz%'output_dir' must be a string or Noner$���z-gr���zc++�env�����=Z ld_so_aixr���r<���)r=���r���r���� isinstance�str�type� TypeErrorr(���r)����joinr?���r@���r%���r'���r*���r���Z EXECUTABLEr���r���r����basenamer4���r5���r6���r7���r+���r���r ���r���rA���)r���Ztarget_descr@���rC���r;���r���r���r���Zexport_symbolsrA���r-���r.���Z build_temprB���r/���Zlib_optsZld_argsZlinker�i�offsetr2���r"���r"���r#����link����sZ����� ��� zUnixCCompiler.linkc�����������������C���s���d|�S�)N�-Lr"���)r����dirr"���r"���r#����library_dir_option����s����z UnixCCompiler.library_dir_optionc�����������������C���s���d|kpd|kS�)NZgcczg++r"���)r���Z compiler_namer"���r"���r#����_is_gcc����s����zUnixCCompiler._is_gccc�����������������C���s����t�j�t�d��}tjd�d��dkr,d|�S�tjd�d��dkrFd|�S�tjd�d��d krz|��|�rnd d|�gS�dd|�gS�|��|�r�t�d�d kr�d|�S�d|�S�nd|�S�d�S�)N�CCr���r���rQ�������Zfreebsdz-Wl,-rpath=����zhp-uxz-Wl,+sz+sZGNULDZyesz-Wl,--enable-new-dtags,-Rz-Wl,-Rz-R)r(���r)���rM���r���r���r4���r5���rT���)r���rR���r���r"���r"���r#����runtime_library_dir_option����s���� z(UnixCCompiler.runtime_library_dir_optionc�����������������C���s���d|�S�)Nz-lr"���)r����libr"���r"���r#����library_option��s����zUnixCCompiler.library_optionc�����������������C���s���|�j�|dd�}|�j�|dd�}|�j�|dd�}|�j�|dd�}tjdkr|t�d�}t�d|�} | d�krrt�t�d ��} n | � d �} |D��] }t j�||�}t j�||�} t j�||�}t j�||�}tjdk�rL|� d�s�|� d��rL|� d ��sLt j�| |d d���|�}t j�| |d d���|�} t j�| |d d���|�}t j�| |d d���|�}t j�| ��rb| ��S�t j�|��rx|��S�t j�|��r�|��S�t j�|�r�|��S�q�d�S�)N�shared)Zlib_type�dylib� xcode_stub�staticr���ZCFLAGSz-isysroot\s*(\S+)rU���rF���z/System/z/usr/z/usr/local/)r>���r4���r5���r���r����re�searchr6���Z_default_sysroot�groupr(���r)���rL���� startswith�exists)r����dirsrY���rA���Zshared_fZdylib_fZxcode_stub_fZstatic_fZcflags�mZsysrootrR���r[���r\���r^���r]���r"���r"���r#����find_library_file��sF���� ��� zUnixCCompiler.find_library_file)NNNNN)Nr���N) NNNNNr���NNNN)r���)�__name__� __module__�__qualname__Z compiler_typeZexecutablesr4���r5���Zsrc_extensionsZ obj_extensionZstatic_lib_extensionZshared_lib_extensionZdylib_lib_extensionZxcode_stub_lib_extensionZstatic_lib_formatZshared_lib_formatZdylib_lib_formatZxcode_stub_lib_formatZ exe_extensionr���r3���r:���rD���rP���rS���rT���rX���rZ���rf���� __classcell__r"���r"���r ���r#���r ���-���sb���� ������� ������ ����������������� B*r ���)�__doc__r(���r4���r_���Z distutilsr���Zdistutils.dep_utilr���Zdistutils.ccompilerr���r���r���Zdistutils.errorsr���r���r ���r ���r���r5���r6���r ���r"���r"���r"���r#����<module>���s���