o
    eߣ                     @  s  d dl mZ d dlZd dlZd dlZd dlZddlm	Z	 ddlm
Z
 ddlmZmZmZmZmZmZ ddlmZmZmZmZ ejrydd	lmZ dd
lmZ ddl	mZmZ ddlmZ ddlm Z  ddl!m"Z" ddl#m$Z$ ddlm%Z% ddl&m'Z' G dd dej(Z)G dd deZ*dS )    )annotationsN   )coredata)mlog)EnvironmentException
Popen_safe
is_windowsLibType	OptionKeyversion_compare   )Compilercuda_buildtype_argscuda_optimization_argscuda_debug_args)CompileCheckMode)BuildTarget)MutableKeyedOptionDictTypeKeyedOptionDictType)
Dependency)Environment)MachineInfo)DynamicLinker)MachineChoice)ExternalProgramc                   @  s   e Zd ZdZdZdS )_PhasecompilerlinkerN)__name__
__module____qualname__COMPILERLINKER r#   r#   >/usr/lib/python3.10/site-packages/mesonbuild/compilers/cuda.pyr   *   s    r   c                      s  e Zd ZdZdZh dZi dddddd	d
dddddddddddddddddddddd d!d"d#d$d%i d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGi dHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdlZdmdn e D ZdoZ		p	pdd fddZ
eddddZedddZejfdddZd ddZd!ddZd"ddZdpdpdd#ddZdZdZdZd$ fddZd%ddZd&ddZd&ddZd'ddZd(ddZd(ddZd)ddĄZd*ddǄZ d*ddɄZ!d+dd̄Z"d(dd΄Z#d,ddфZ$d-ddԄZ%d.dd؄Z&d/d0dd݄Z'd1ddZ(d2ddZ)d-ddZ*d3ddZ+d4ddZ,d(ddZ-d5ddZ.d6ddZ/d(ddZ0e1j2dfd7ddZ3d8ddZ4d8ddZ5d9 fd	d
Z6d: fddZ7d: fddZ8d&ddZ9d(ddZ:d(ddZ;d;ddZ<  Z=S (<  CudaCompilerz	-Xlinker=Zcuda>w   z-Wno-deprecated-gpu-targets-cz--disable-warningsz-dwz--resource-usagez--objdir-as-tempdirz
--device-cz--dryrunz-nodlink-wz-cleanz-Wext-lambda-captures-thisz-keepz--compile-as-tools-patchz--ptxz--extra-device-vectorizationz-dltoz-ewpz
--device-wz--device-link--runz--extended-lambdaz--source-in-ptxz-Wno-deprecated-declarationsz-dryrunz-Ez-forward-unknown-to-host-linkerz
--Wreorderz-noehz-arch-lsz!-forward-unknown-to-host-compilerz$--generate-dependencies-with-compilez	--verbosez-astoolspatchz--display-error-numberz-dcz-ptxz-expt-extended-lambdaz--device-debugz--Wno-deprecated-declarationsz-MDz-keep-device-functionsz	-lineinfoz-nohdinitlistz--m64z-MMz--keepz-cudaz-MMDz-Vz--fatbinz--Wno-deprecated-gpu-targetsz--generate-line-infoz.--generate-nonsystem-dependencies-with-compilez--extensible-whole-programz-m64z	-restrictz--allow-unsupported-compilerz-expt-relaxed-constexprz-code-lsz--cubinz	--compilez	--versionz--preprocessz-Mz--m32z--keep-device-functionsz--no-device-linkz	--profilez"--forward-unknown-to-host-compilerz--use_fast_mathz-vz-m32z-save-tempsz--helpz	-Wreorderz-cubinz-allow-unsupported-compilerz--linkz--libz--sharedz-objtempz--Wdefault-stream-launchz--Wext-lambda-captures-thisz--clean-targetsz-MPz-sharedz-hz-libz-dlink-use_fast_mathz-extra-device-vectorizationz--debugz-src-in-ptxz!--no-host-device-initializer-listz-fatbinz--generate-dependenciesz-err-noz--generate-dependency-targetsz-extended-lambdaz-Wdefault-stream-launchz
-res-usagez-Gz--dlink-time-optz
--restrictz--expt-extended-lambdaz--no-exceptionsz--dont-use-profilez-noprofz--cudaz-pgz--list-gpu-archz-gz--save-tempsz--no-align-doublez --forward-unknown-to-host-linkerz--list-gpu-codez!--generate-nonsystem-dependenciesz--expt-relaxed-constexprz--output-file-oz--pre-include-includez	--library-lz--define-macro-Dz--undefine-macro-Uz--include-path-Iz--system-include-isystemz--library-path-Lz--output-directoryz-odirz--dependency-outputz-MFz--compiler-bindirz-ccbinz--archiver-binaryz-arbinz--cudart-cudartz--cudadevrtz
-cudadevrtz--libdevice-directoryz-ldirz--target-directoryz-target-dirz--optimization-infoz	-opt-infoz
--optimize-Oz--ftemplate-backtrace-limitz-ftemplate-backtrace-limitz--ftemplate-depthz-ftemplate-depthz--xz-xz--std-stdz	--machine-mz--compiler-options
-Xcompilerz--linker-optionsz-Xlinkerz--archive-optionsz	-Xarchivez--ptxas-optionsz-Xptxasz--nvlink-optionsz-Xnvlinkz	--threads-tz
--keep-dirz	-keep-dirz
--run-argsz	-run-argsz--input-drive-prefixz-idpz--dependency-drive-prefixz-ddpz--drive-prefixz-dpz--dependency-target-namez-MTz--default-streamz-default-streamz--gpu-architecturez-archz
--gpu-codez-codez--generate-codez-gencodez--relocatable-device-codez-rdcz	--entriesz-ez--maxrregcountz-maxrregcountz--ftzz-ftzz
--prec-divz	-prec-divz--prec-sqrtz
-prec-sqrtz--fmadz-fmadz--Werrorz-Werrorz--diag-errorz-diag-errorz--diag-suppressz-diag-suppressz--diag-warnz
-diag-warnz--options-filez-optfz-timez-qpp-config)z--timez--qpp-configc                 C  s   i | ]\}}||qS r#   r#   ).0kvr#   r#   r$   
<dictcomp>       zCudaCompiler.<dictcomp>ZnvccNccacheT.List[str]exelistversionstrfor_machiner   is_crossboolexe_wrapperT.Optional['ExternalProgram']host_compilerr   info'MachineInfo'r   T.Optional['DynamicLinker']full_versionT.Optional[str]c              
     sN   t  j||||||	|
|d | _| _|j _ fdd|j D  _d S )N)r   rK   rC   c                   s   i | ]
\}}|  |qS r#   )_to_host_flags)r8   levelflagsselfr#   r$   r;          z)CudaCompiler.__init__.<locals>.<dictcomp>)super__init__rE   rG   Zbase_options	warn_argsitems)rQ   r=   r?   r@   rB   rC   rE   rG   rH   r   rK   	__class__rP   r$   rT      s
   zCudaCompiler.__init__Targlistmodereturnc              	     sT  d}d}d}d}|| |  t tjd }||vs|sO||vr.t ||r,|| | S |S fdd||D }t fdd|D d	d
 g }d|S dg}d}	t|}
|
D ]A}||krh|	sh|d qZ||krx|d
  |7  < |	 }	qZ||krz|d
  t	|
7  < W qZ t
y   Y  n
w |d
  |7  < qZfdd|D }d|S )a  
        Shield an argument against both splitting by NVCC's list-argument
        parse logic, and interpretation by any shell.

        NVCC seems to consider every comma , that is neither escaped by \ nor inside
        a double-quoted string a split-point. Single-quotes do not provide protection
        against splitting; In fact, after splitting they are \-escaped. Unfortunately,
        double-quotes don't protect against shell expansion. What follows is a
        complex dance to accommodate everybody.
        '",\z"$`\c                   s   g | ]}  |qS r#   _shield_nvcc_list_argr8   sclsr#   r$   
<listcomp>   r<   z6CudaCompiler._shield_nvcc_list_arg.<locals>.<listcomp>c                   s   g | ]}| gqS r#   r#   rb   )DQSQr#   r$   rf          N Fc                   s   g | ]	} j |d dqS )F)rZ   r`   rb   rd   r#   r$   rf      s    z\,)setstring
whitespaceintersectionsplitsumjoiniterappendnextStopIteration)re   rY   rZ   ZSQZDQZCMZBSZquotablelinstringZargitcr#   )rg   re   r$   ra      s@    

z"CudaCompiler._shield_nvcc_list_argrO   c                   s   t |dkr|S t|}g }dddddd	 d fd
d}d fdd}d}|D ]G}||s9d}|| q+|rO|d  d7  < |d  |||7  < q+|rcd}|| |||| q+ |rod}|| q+td|S )z
        The flags to NVCC gets exceedingly verbose and unreadable when too many of them
        are shielded with -Xcompiler. Merge consecutive -Xcompiler-wrapped arguments
        into one.
        r   flagrA   r[   rD   c                 S  s   | dkS )Nr6   r#   ry   r#   r#   r$   is_xcompiler_flag_isolated     z=CudaCompiler._merge_flags.<locals>.is_xcompiler_flag_isolatedc                 S  s
   |  dS )N-Xcompiler=)
startswithrz   r#   r#   r$   is_xcompiler_flag_glued
     
z:CudaCompiler._merge_flags.<locals>.is_xcompiler_flag_gluedc                   s   | p | S Nr#   rz   r   r{   r#   r$   is_xcompiler_flag     z4CudaCompiler._merge_flags.<locals>.is_xcompiler_flagflagitT.Iterator[str]c                   s8    | r| t dd  S zt|W S  ty   Y dS w )Nr}   rj   )lenrt   ru   )ry   r   )r   r#   r$   get_xcompiler_val  s   
z4CudaCompiler._merge_flags.<locals>.get_xcompiler_valFri   r^   Tz6-Xcompiler flag merging failed, unknown argument form!N)ry   rA   r[   rD   )ry   rA   r   r   r[   rA   )r   rr   rs   
ValueError)re   rO   r   xflagsr   r   Zingroupry   r#   r   r$   _merge_flags   s2   

	
zCudaCompiler._merge_flagsphaser   c              	   C  s  g }t |}|D ]}|| jv r|| q|dd dvr$|| q|dd dkrEd|v r2dnd}|d|j d	| | |  qt|d
kr|d dkr|d dv r|d
d dkrozt|}W n tyn   Y nw |d
d d	kr~|dd }n|d
d }|dd
 }n|| jv s|| jv rzt|}W n ty   Y nw |	d	dd | jv s|	d	dd | jv r|	d	d\}}np|
dr|dd  }|dd }n\|dkr|d |d|  nJ|dkr|d |d |d |d|  n.|dkr|d |d|  n|dkr)|d |d|  n
|d| |  q|dus;J | j||}|dv rut|d
krY||| |  q|dkrg|| j v rgq|| || | q|dkr|dkr|d |d |d |||  q|d v r|d |||  q|||  q|d!v r|||  q|d"v r||d	 |  q|| || q| |S )#z
        Translate generic "GCC-speak" plus particular "NVCC-speak" flags to NVCC flags.

        NVCC's "short" flags have broad similarities to the GCC standard, but have
        gratuitous, irritating differences.
        Nr   z-//r^   r]   rj   z-X=r   r   -ZIDULlmOxmte   r0      z-ffast-mathr)   r}   z-fno-fast-mathz
-ftz=falsez-prec-div=truez-prec-sqrt=truez-freciprocal-mathz-prec-div=falsez-fno-reciprocal-math>   r+   r0   r/   r1   r,   r3   Zfastz-O3r6   >   rc   zg>   r7   r.   r-   r5   >   r4   )rr   _FLAG_PASSTHRU_NOARGSrs   valuer   rt   ru   _FLAG_LONG2SHORT_WITHARGS_FLAG_SHORT2LONG_WITHARGSro   r~   stripra   getrG   Zget_default_include_dirsr   )rQ   rO   r   r   r   ry   wrapvalr#   r#   r$   rM   ,  s   

3

 $












	











zCudaCompiler._to_host_flagsc                 C     dS )NFr#   rP   r#   r#   r$   needs_static_linker     z CudaCompiler.needs_static_linkerenvironment'Environment'c                 C     |  | j|tjS r   )rM   rG   thread_link_flagsr   r"   )rQ   r   r#   r#   r$   r        zCudaCompiler.thread_link_flagswork_direnvNonec                 C  sr  t d|   d d| j t dt| j  d}d}|ddd	 }|| jr,d
nd7 }tj	||}tj	||d }t
|ddd}|| W d    n1 sVw   Y  d| _g }	|	ddd|g7 }	|	| |jj7 }	| jr| jd u r|	|  7 }	|	| |7 }	| j|	 }
t dd|
 t|
|d\}}}t d t | t d t | t d |jd	krtd|   d| jr| jd u rd S | j |g }
n| jdd| d g }
t dd|
 t|
|d\}}}t d t | t d t | t d |  |jd	kr&td| j d |   d!|dkr0|| _d S t d"|  d S )#NzSanity testing z
 compiler: zIs cross compiler: %s.zsanitycheckcuda.cua  
        #include <cuda_runtime.h>
        #include <stdio.h>

        __global__ void kernel (void) {}

        int main(void){
            struct cudaDeviceProp prop;
            int count, i;
            cudaError_t ret = cudaGetDeviceCount(&count);
            if(ret != cudaSuccess){
                fprintf(stderr, "%d\n", (int)ret);
            }else{
                for(i=0;i<count;i++){
                    if(cudaGetDeviceProperties(&prop, i) == cudaSuccess){
                        fprintf(stdout, "%d.%d\n", prop.major, prop.minor);
                    }
                }
            }
            fflush(stderr);
            fflush(stdout);
            return 0;
        }
        .r   r   Z_crossrj   z.exewzutf-8)encodingr'   r2   staticz$Sanity check compiler command line: )cwdzSanity check compile stdout: z"-----
Sanity check compile stderr:z-----z	Compiler z cannot compile programs.r(   r]   zSanity check run command line: zSanity check run stdout: z-----
Sanity check run stderr:zExecutables created by z
 compiler z are not runnable.zcudaGetDeviceCount() returned )r   debugZget_display_languagerq   r?   rA   rC   rsplitospathopenwriteZdetected_ccget_ccbin_argsr   optionsrE   get_compile_only_argsget_output_argsr   
returncoder   Zname_stringZget_commandwaitlanguage)rQ   r   r   ZsnamecodeZbinnameZsource_nameZbinary_nameZofilerO   ZcmdlistZpcZstdoZstdeper#   r#   r$   sanity_check  s\    















zCudaCompiler.sanity_check
extra_argsdependencieshnamesymbolprefixr   GT.Union[None, T.List[str], T.Callable[[CompileCheckMode], T.List[str]]]r    T.Optional[T.List['Dependency']]T.Tuple[bool, bool]c                C  s`   |d u rg }|||d}d}| j |||||d\}	}
|	r"d|
fS d}| j |||||dS )N)r   headerr   z{prefix}
        #include <{header}>
        int main(void) {{
            /* If it's not defined as a macro, try to use as a symbol */
            #ifndef {symbol}
                {symbol};
            #endif
            return 0;
        }}r   Tzw{prefix}
        #include <{header}>
        using {symbol};
        int main(void) {{
            return 0;
        }})Zcompiles
format_map)rQ   r   r   r   r   r   r   Zfargstfoundcachedr#   r#   r$   has_header_symbolM  s   	zCudaCompiler.has_header_symbolz>=9.0z>=11.0z>=12.0'MutableKeyedOptionDictType'c              	     s   t   }td| j| jd}td| j| jd}g d}t| j| jr'|dg7 }t| j| jr3|dg7 }t| j| j	r?|dg7 }|
|td|d	|td
di |S )Nstdmachinelangccbindir)nonezc++03zc++11zc++14zc++17zc++20z&C++ language standard to use with CUDAr   z4CUDA non-default toolchain directory to use (-ccbin)rj   )rS   get_optionsr
   rB   r   r   r@   _CPP14_VERSION_CPP17_VERSION_CPP20_VERSIONupdater   ZUserComboOptionZUserStringOption)rQ   optsstd_keyZccbindir_keyZcpp_stdsrW   r#   r$   r   n  s&   



zCudaCompiler.get_optionsr   'KeyedOptionDictType'c                   sF    fdd| j   D }td| j| j jd}|di}tj||dS )zM
        Convert an NVCC Option set to a host compiler's option set.
        c                   s   i | ]\}}|  ||qS r#   )r   )r8   keyoptr   r#   r$   r;     s    z:CudaCompiler._to_host_compiler_options.<locals>.<dictcomp>r   r   r   )	overrides)rG   r   rV   r
   rB   r   r   ZOptionsView)rQ   r   Zhost_optionsr   r   r#   r   r$   _to_host_compiler_options  s   z&CudaCompiler._to_host_compiler_optionsc                 C  s`   |  |}t s"td| j| jd}|| }|jdkr"|d|j  || | j	| 
| S )Nr   r   r   z--std=)r   r   r
   rB   r   r   rs   rM   rG   get_option_compile_argsr   )rQ   r   argsr   r   r#   r#   r$   r     s   

z$CudaCompiler.get_option_compile_argsc                 C  s*   |  |}|| | j| |tj S r   )r   rM   rG   get_option_link_argsr   r   r"   )rQ   r   r   r#   r#   r$   r     s   
 z!CudaCompiler.get_option_link_args
shlib_namesuffix	soversiondarwin_versionsT.Tuple[str, str]c              
   C  s    |  | j||||||tjS r   )rM   rG   get_soname_argsr   r"   )rQ   r   r   r   r   r   r   r#   r#   r$   r     s
   
zCudaCompiler.get_soname_argsc                 C     dgS )Nr&   r#   rP   r#   r#   r$   r        z"CudaCompiler.get_compile_only_argsc                 C  r   )Nz-O0r#   rP   r#   r#   r$   get_no_optimization_args  r   z%CudaCompiler.get_no_optimization_argsoptimization_levelc                 C     t | S r   )r   )rQ   r   r#   r#   r$   get_optimization_args  s   z"CudaCompiler.get_optimization_argsr   c                 C     |  | j|S r   )rM   rG   sanitizer_compile_argsrQ   r   r#   r#   r$   r        z#CudaCompiler.sanitizer_compile_argsc                 C  r   r   )rM   rG   sanitizer_link_argsr   r#   r#   r$   r     r   z CudaCompiler.sanitizer_link_argsis_debugc                 C  r   r   )r   )rQ   r   r#   r#   r$   get_debug_args  r|   zCudaCompiler.get_debug_argsc                 C  r   )NzB-Werror=cross-execution-space-call,deprecated-declarations,reorderr#   rP   r#   r#   r$   get_werror_args  r   zCudaCompiler.get_werror_argsrN   c                 C  s
   | j | S r   )rU   )rQ   rN   r#   r#   r$   get_warn_args  r   zCudaCompiler.get_warn_args	buildtypec                 C  s(   dd | j |D }t| | | S )Nc                 S  s   g | ]
}|d kr
dn|qS )z/ZIz/Zir#   r8   rY   r#   r#   r$   rf     rR   z3CudaCompiler.get_buildtype_args.<locals>.<listcomp>)rG   get_buildtype_argsr   rM   )rQ   r   Z	host_argsr#   r#   r$   r     s   zCudaCompiler.get_buildtype_argsr   	is_systemc                 C  s$   |dkrd}|rd| gS d| gS )Nrj   r   z	-isystem=r/   r#   )rQ   r   r   r#   r#   r$   get_include_args  s   zCudaCompiler.get_include_argsFrel_objpchc                 C     |  | j||S r   )rM   rG   get_compile_debugfile_args)rQ   r   r   r#   r#   r$   r        z'CudaCompiler.get_compile_debugfile_args
targetfilec                 C  r   r   )rM   rG   get_link_debugfile_argsr   r"   )rQ   r  r#   r#   r$   r    r   z$CudaCompiler.get_link_debugfile_argsc                 C  r   )Ndr#   rP   r#   r#   r$   get_depfile_suffix  r   zCudaCompiler.get_depfile_suffixc                 C  r   r   )rM   rG   get_buildtype_linker_argsr   r"   )rQ   r   r#   r#   r$   r    r   z&CudaCompiler.get_buildtype_linker_args	build_dirfrom_dirrpath_pathsT.Tuple[str, ...]build_rpathinstall_rpath"T.Tuple[T.List[str], T.Set[bytes]]c           	      C  s,   | j ||||||\}}| |tj|fS r   )rG   build_rpath_argsrM   r   r"   )	rQ   r   r  r  r	  r  r  Z
rpath_argsZrpath_dirs_to_remover#   r#   r$   r    s   zCudaCompiler.build_rpath_argsr   c                 C  s   |S r   r#   )rQ   r   r#   r#   r$   linker_to_compiler_args  r   z$CudaCompiler.linker_to_compiler_argsc                 C  s   |  | j S r   )rM   rG   get_pic_argsrP   r#   r#   r$   r    r   zCudaCompiler.get_pic_argsparameter_listc                 C  s   g S r   r#   )rQ   r  r  r#   r#   r$   &compute_parameters_with_absolute_paths  s   z3CudaCompiler.compute_parameters_with_absolute_pathstargetc                 C  s   d|gS )Nr*   r#   rQ   r  r#   r#   r$   r     r|   zCudaCompiler.get_output_argsc                 C  s   |  | j tjS r   )rM   rG   get_std_exe_link_argsr   r"   rP   r#   r#   r$   r    r  z"CudaCompiler.get_std_exe_link_argslibname
extra_dirslibtyper	   lib_prefix_warningT.Optional[T.List[str]]c                 C  s
   d| gS )Nr,   r#   )rQ   r  r   r  r  r  r#   r#   r$   find_library  s   
zCudaCompiler.find_librarycrt_valc                 C  r   r   )rM   rG   get_crt_compile_args)rQ   r  r   r#   r#   r$   r    r  z!CudaCompiler.get_crt_compile_argsc                 C  sJ   g }| j ||}tdd |D r|dg7 }| || j || tjS )Nc                 s  s    | ]}|d v V  qdS )>   z/MDdz/MTdz/MDNr#   r   r#   r#   r$   	<genexpr>  s    z1CudaCompiler.get_crt_link_args.<locals>.<genexpr>z/NODEFAULTLIB:LIBCMT.lib)rG   r  anyrM   get_crt_link_argsr   r"   )rQ   r  r   Zhost_link_arg_overridesZhost_crt_compile_argsr#   r#   r$   r     s
   
zCudaCompiler.get_crt_link_args'BuildTarget'c                      |  t |tjS r   )rM   rS   get_target_link_argsr   r"   r  rW   r#   r$   r#    r   z!CudaCompiler.get_target_link_argsdep'Dependency'c                   s   |  t |S r   )rM   rS   get_dependency_compile_argsrQ   r$  rW   r#   r$   r&    r   z(CudaCompiler.get_dependency_compile_argsc                   r"  r   )rM   rS   get_dependency_link_argsr   r"   r'  rW   r#   r$   r(    r   z%CudaCompiler.get_dependency_link_argsc                 C  sD   t d| j| jd}|| j}t|tr |dkr | d| dgS g S )Nr   r   rj   z-ccbin=F)r
   rB   r   r   
isinstancerA   ra   )rQ   r   r   r   r#   r#   r$   r     s
   
zCudaCompiler.get_ccbin_argsc                 C     dd | j  D S )Nc                 S     g | ]}d | qS r}   r#   r8   xr#   r#   r$   rf     rh   z:CudaCompiler.get_profile_generate_args.<locals>.<listcomp>)rG   get_profile_generate_argsrP   r#   r#   r$   r/    r  z&CudaCompiler.get_profile_generate_argsc                 C  r*  )Nc                 S  r+  r,  r#   r-  r#   r#   r$   rf     rh   z5CudaCompiler.get_profile_use_args.<locals>.<listcomp>)rG   get_profile_use_argsrP   r#   r#   r$   r0    r  z!CudaCompiler.get_profile_use_argsdisablec                 C  s   | j |S r   )rG   get_assert_args)rQ   r1  r#   r#   r$   r2    s   zCudaCompiler.get_assert_args)NN)r=   r>   r?   r>   r@   rA   rB   r   rC   rD   rE   rF   rG   r   rH   rI   r   rJ   rK   rL   )T)rY   rA   rZ   rD   r[   rA   )rO   r>   r[   r>   )rO   r>   r   r   r[   r>   )r[   rD   )r   r   r[   r>   )r   rA   r   r   r[   r   )r   rA   r   rA   r   rA   r   r   r   r   r   r   r[   r   )r[   r   )r   r   r[   r   )r   r   r[   r>   )r   r   r   rA   r   rA   r   rA   r   rA   r   r   r[   r>   )r[   r>   )r   rA   r[   r>   )r   rA   r[   r>   )r   rD   r[   r>   )rN   rA   r[   r>   )r   rA   r[   r>   )r   rA   r   rD   r[   r>   )F)r   rA   r   rD   r[   r>   )r  rA   r[   r>   )r[   rA   )r   r   r  rA   r  rA   r	  r
  r  rA   r  rA   r[   r  )r   r>   r[   r>   )r  r>   r  rA   r[   r>   )r  rA   r[   r>   )r  rA   r   r   r  r>   r  r	   r  rD   r[   r  )r  rA   r   rA   r[   r>   )r  r!  r[   r>   )r$  r%  r[   r>   )r1  rD   r[   r>   )>r   r   r    ZLINKER_PREFIXr   r   r   rV   r   idrT   classmethodra   r   r   r!   rM   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r  r  r   r  r	   ZPREFER_SHAREDr  r  r   r#  r&  r(  r   r/  r0  r2  __classcell__r#   r#   rW   r$   r%   0   sL   C	
 !"#$%&'()*+,-./012348:0 4j	r%   )+
__future__r   enumos.pathr   rl   typingTrj   r   r   Zmesonlibr   r   r   r	   r
   r   	compilersr   r   r   r   TYPE_CHECKINGr   buildr   r   r   r   r   r   r   Z	envconfigr   Zlinkers.linkersr   r   Zprogramsr   Enumr   r%   r#   r#   r#   r$   <module>   s*    