
    -Ph                        U d dl mZ 	 d dlZd dlZd dlZej        rddlmZ ddl	m
Z
 ddlmZ neZg dgdgdgd	gd
gdgdZded<   g ddgdZded<   ddgZded<    G d de          ZdS )    )annotationsN   )MachineInfo)Environment)Compilerz-O0z-O1z-O2z-O3z-Os)plain0g123szT.Dict[str, T.List[str]]ccomp_optimization_argsz-g)FTzT.Dict[bool, T.List[str]]ccomp_debug_argsz^-ffreestanding$z^-r$T.List[str]ccomp_args_to_wulc                      e Zd ZdZd"dZd#dZd#dZd$d	Zd%dZe	d&d            Z
d'dZd#dZd#dZd#dZd#dZd#dZd(dZd)dZd*d Zd!S )+CompCertCompilerccompreturnNonec                    | j                             d           | j                             d           g }g ||g z   |g z   |g z   d| _        d S )Nr   sx)r	   r   r   r   
everything)can_compile_suffixesadd	warn_args)selfdefault_warn_argss     d/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/mesonbuild/compilers/mixins/compcert.py__init__zCompCertCompiler.__init__1   sf    !%%c***!%%d+++)+""R'"R'+b042 42    r   c                    g S N r   s    r    get_always_argsz CompCertCompiler.get_always_args=       	r"   c                    g S r$   r%   r&   s    r    get_pic_argszCompCertCompiler.get_pic_args@   s    	r"   strc                    dS )Npchr%   r&   s    r    get_pch_suffixzCompCertCompiler.get_pch_suffixD   s    ur"   pch_dirheaderc                    g S r$   r%   )r   r/   r0   s      r    get_pch_use_argsz!CompCertCompiler.get_pch_use_argsG   r(   r"   argsinfor   c                    g }|D ]T}d}t           D ]1}t          j        ||          r|                    d|z              d}2|s|                    |           U|S )z7Always returns a copy that can be independently mutatedr   z-WUl,   )r   rematchappend)clsr3   r4   patched_argsargaddedptrns          r    _unix_args_to_nativez%CompCertCompiler._unix_args_to_nativeJ   s     %' 	) 	)CE)  8D#&&  ''#666E )##C(((r"   env'Environment'c                    g S r$   r%   )r   r@   s     r    thread_flagszCompCertCompiler.thread_flagsX   r(   r"   c                    dgS )Nz-Er%   r&   s    r    get_preprocess_only_argsz)CompCertCompiler.get_preprocess_only_args[   	    vr"   c                    dgS )Nz-cr%   r&   s    r    get_compile_only_argsz&CompCertCompiler.get_compile_only_args^   rF   r"   c                    g S r$   r%   r&   s    r    get_coverage_argsz"CompCertCompiler.get_coverage_argsa   r(   r"   c                    dgS )Nz	-nostdincr%   r&   s    r    get_no_stdinc_argsz#CompCertCompiler.get_no_stdinc_argsd   
    }r"   c                    dgS )Nz	-nostdlibr%   r&   s    r    get_no_stdlib_link_argsz(CompCertCompiler.get_no_stdlib_link_argsg   rM   r"   optimization_levelc                    t           |         S r$   )r   )r   rP   s     r    get_optimization_argsz&CompCertCompiler.get_optimization_argsj   s    &'9::r"   is_debugboolc                    t           |         S r$   )r   )r   rS   s     r    get_debug_argszCompCertCompiler.get_debug_argsm   s    ))r"   parameter_list	build_dirc           
         t          |          D ]f\  }}|d d         dk    rS|d d         t          j                            t          j                            ||dd                              z   ||<   g|S )N	   z-I)	enumerateospathnormpathjoin)r   rW   rX   idxis        r    &compute_parameters_with_absolute_pathsz7CompCertCompiler.compute_parameters_with_absolute_pathsp   s{    // 	_ 	_FC!u}}&'ebg.>.>rw||IWXYZY[Y[W\?]?].^.^&^s#r"   N)r   r   )r   r   )r   r+   )r/   r+   r0   r+   r   r   )r3   r   r4   r   r   r   )r@   rA   r   r   )rP   r+   r   r   )rS   rT   r   r   )rW   r   rX   r+   r   r   )__name__
__module____qualname__idr!   r'   r*   r.   r2   classmethodr?   rC   rE   rH   rJ   rL   rO   rR   rV   rb   r%   r"   r    r   r   -   sQ       	B
2 
2 
2 
2                [                  ; ; ; ;* * * *     r"   r   )
__future__r   r\   r7   typingTTYPE_CHECKING	envconfigr   environmentr   compilers.compilersr   objectr   __annotations__r   r   r   r%   r"   r    <module>rq      sZ   # " " " " " " A 				 				    ? 	((((((******/////// H 





5 5      $-/ /      	"     
H H H H Hx H H H H Hr"   