
    -PhG                        U d dl mZ 	 d dlZd dlZddlm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gdZded<    G d de          ZdS )    )annotationsN   )EnvironmentException)MachineInfo)Environment)Compilerz-O0-Ooffz-O1z-O2z-O3z-O4)plain0g123szT.Dict[str, T.List[str]]ti_optimization_argsz-g)FTzT.Dict[bool, T.List[str]]ti_debug_argsc                      e Zd Z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d0dZd+dZd+dZd1dZd+dZd2dZed3d"            Zd4d%Zd5d(Zd)S )6
TICompilertireturnNonec                    | j         st          d          | j                            d           | j                            d           g }g ||g z   |g z   |g z   d| _        d S )Nz,TI compilers only support cross-compilation.asmcla)r   r   r   r   
everything)is_crossr   can_compile_suffixesadd	warn_args)selfdefault_warn_argss     ^/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/mesonbuild/compilers/mixins/ti.py__init__zTICompiler.__init__,   s    } 	W&'UVVV!%%e,,,!%%e,,,)+""R'"R'+b042 42    T.List[str]c                    g S N r    s    r"   get_pic_argszTICompiler.get_pic_args;   s	     	r$   strc                    dS )Npchr(   r)   s    r"   get_pch_suffixzTICompiler.get_pch_suffix@   s    ur$   pch_dirheaderc                    g S r'   r(   )r    r/   r0   s      r"   get_pch_use_argszTICompiler.get_pch_use_argsC       	r$   env'Environment'c                    g S r'   r(   )r    r4   s     r"   thread_flagszTICompiler.thread_flagsF   r3   r$   c                    g S r'   r(   r)   s    r"   get_coverage_argszTICompiler.get_coverage_argsI   r3   r$   c                    g S r'   r(   r)   s    r"   get_no_stdinc_argszTICompiler.get_no_stdinc_argsL   r3   r$   c                    g S r'   r(   r)   s    r"   get_no_stdlib_link_argsz"TICompiler.get_no_stdlib_link_argsO   r3   r$   optimization_levelc                    t           |         S r'   )r   )r    r>   s     r"   get_optimization_argsz TICompiler.get_optimization_argsR   s    #$677r$   is_debugboolc                    t           |         S r'   )r   )r    rA   s     r"   get_debug_argszTICompiler.get_debug_argsU   s    X&&r$   c                    g S r'   r(   r)   s    r"   get_compile_only_argsz TICompiler.get_compile_only_argsX   r3   r$   c                    dgS )Nr	   r(   r)   s    r"   get_no_optimization_argsz#TICompiler.get_no_optimization_args[   s
    yr$   
outputnamec                    d| gS )Nz--output_file=r(   )r    rI   s     r"   get_output_argszTICompiler.get_output_args^   s    ---..r$   c                    dgS )Nz--emit_warnings_as_errorsr(   r)   s    r"   get_werror_argszTICompiler.get_werror_argsa   s    +,,r$   path	is_systemc                    |dk    rd}d|z   gS )N .z-I=r(   )r    rN   rO   s      r"   get_include_argszTICompiler.get_include_argsd   s    2::D~r$   argsinfor   c                    g }|D ]l}|                     d          rd|dd          z   }|                     d          r:|dk    rA|                     d          rW|                    |           m|S )Nz-Dz	--define=   z-Wl,-rpath=z--print-search-dirsz-L)
startswithappend)clsrT   rU   resultis        r"   _unix_args_to_nativezTICompiler._unix_args_to_nativei   s      		 		A||D!! (!ABB%'||M** +++d## MM!r$   parameter_list	build_dirc           
        t          |          D ]\  }}|d d         dk    rS|d d         t          j                            t          j                            ||dd                              z   ||<   |d d         dk    rS|d d         t          j                            t          j                            ||dd                              z   ||<   |S )N   z--include_path=rW   z-I)	enumerateosrN   normpathjoin)r    r^   r_   idxr\   s        r"   &compute_parameters_with_absolute_pathsz1TICompiler.compute_parameters_with_absolute_pathsx   s    // 	_ 	_FC"v***&'frw/?/?YXYZ\Z]Z]X^@_@_/`/`&`s#!u}}&'ebg.>.>rw||IWXYZY[Y[W\?]?].^.^&^s#r$   	outtargetoutfilec                    dd| gS )Nz--preproc_with_compilez--preproc_dependency=r(   )r    rh   ri   s      r"   get_dependency_gen_argsz"TICompiler.get_dependency_gen_args   s    (*K'*K*KLLr$   N)r   r   )r   r%   )r   r+   )r/   r+   r0   r+   r   r%   )r4   r5   r   r%   )r>   r+   r   r%   )rA   rB   r   r%   )rI   r+   r   r%   )rN   r+   rO   rB   r   r%   )rT   r%   rU   r   r   r%   )r^   r%   r_   r+   r   r%   )rh   r+   ri   r+   r   r%   )__name__
__module____qualname__idr#   r*   r.   r2   r7   r9   r;   r=   r@   rD   rF   rH   rK   rM   rS   classmethodr]   rg   rk   r(   r$   r"   r   r   (   s       	B2 2 2 2   
                  8 8 8 8' ' ' '      / / / /- - - -   
    [   M M M M M Mr$   r   )
__future__r   rc   typingTmesonlibr   TYPE_CHECKING	envconfigr   environmentr   compilers.compilersr   objectr   __annotations__r   r   r(   r$   r"   <module>r{      sF   # " " " " " " H 				     , , , , , ,? 	((((((******/////// H 





2 2      &, ,    ZM ZM ZM ZM ZM ZM ZM ZM ZM ZMr$   