
    -Phy                    
   d dl m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 ddlmZ dd	lmZ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mZmZ ej        r*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) ddl*m+Z+  G d dee          Z, G d dee,          Z- G d dee,          Z. G d de,          Z/ G d de,          Z0 G d  d!ee,          Z1 G d" d#e1          Z2 G d$ d%ee,          Z3 G d& d'e3          Z4 G d( d)e,          Z5 G d* d+ee,          Z6 G d, d-ee,          Z7 G d. d/ee,          Z8 G d0 d1e8          Z9 G d2 d3ee,          Z: G d4 d5e,          Z; G d6 d7e,          Z<dS )8    )annotationsN   )options)mesonlib   )clike_debug_argsCompilerCompileCheckMode)CLikeCompiler)GnuCompilergnu_optimization_args)IntelGnuLikeCompilerIntelVisualStudioLikeCompiler)ClangCompiler)ElbrusCompiler)PGICompiler)version_compareMesonExceptionLibType)MutableKeyedOptionDictType)
Dependency)MachineInfo)Environment)DynamicLinker)MachineChoice)BuildTargetc                  ,    e Zd ZdZ	 	 dPdQdZddddRdZdSd!ZdTd%ZdUd'ZdVd)Z	dW fd*Z
dXd,ZdYd.ZdZd1Zd[d3Zej        d4fd\d:Zd]d<Zd]d=Zd^ fd?Zd_dBZ	 	 dPd`dHZddId`dJZddddadLZddddbdNZ ej                    dcdO            Z xZS )dFortranCompilerfortranNexelistT.List[str]versionstrfor_machiner   is_crossboolinfo'MachineInfo'linkerT.Optional['DynamicLinker']full_versionT.Optional[str]c                h    t          j        | g |||||||	  	         t          j        |            d S )N)r%   r+   r)   )r	   __init__r   selfr    r"   r$   r%   r'   r)   r+   s           \/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/mesonbuild/compilers/fortran.pyr.   zFortranCompiler.__init__+   sL     	$GWk4#+,v	W 	W 	W 	Wt$$$$$    
extra_argsdependenciesfuncnameprefixenv'Environment'r4   T.Optional[T.List[str]]r5    T.Optional[T.List['Dependency']]returnT.Tuple[bool, bool]c                    t          d          )NzFortran does not have "has_function" capability.
It is better to test if a Fortran capability is working like:

meson.get_compiler('fortran').links('block; end block; end program')

that example is to see if the compiler has Fortran 2008 Block element.)r   )r0   r6   r7   r8   r4   r5   s         r1   has_functionzFortranCompiler.has_function3   s      f g g 	gr2   moder
   !T.Tuple[T.List[str], T.List[str]]c                    |j                             | j        | j                  }|j                             | j        | j                  }||fS N)coredataget_external_argsr$   languageget_external_link_args)r0   r8   r@   cargslargss        r1   _get_basic_compiler_argsz(FortranCompiler._get_basic_compiler_args;   sD    ..t/?OO33D4DdmTTe|r2   work_direnvironmentNonec                :    d}d}|                      ||||          S )Nzsanitycheckf.fzN      PROGRAM MAIN
      PRINT *, "Fortran compilation is working."
      END
)_sanity_check_impl)r0   rK   rL   source_namecodes        r1   sanity_checkzFortranCompiler.sanity_check@   s&    &b&&xk4PPPr2   optimization_levelc                    t           |         S rC   )r   )r0   rS   s     r1   get_optimization_argsz%FortranCompiler.get_optimization_argsE   s    $%788r2   is_debugc                    t           |         S rC   )r   )r0   rV   s     r1   get_debug_argszFortranCompiler.get_debug_argsH   s    ))r2   c                L    dgt                                                      z   S )N-cpp)superget_preprocess_only_args)r0   	__class__s    r1   r\   z(FortranCompiler.get_preprocess_only_argsK   s     x%''::<<<<r2   T.Tuple[str, ...]c                    dS )N)-I r0   s    r1   get_module_incdir_argsz&FortranCompiler.get_module_incdir_argsN       xr2   pathc                
    d|gS )Nz-modulera   r0   re   s     r1   get_module_outdir_argsz&FortranCompiler.get_module_outdir_argsQ   s    4  r2   parameter_list	build_dirc           
        t          |          D ]t\  }}|d d         dk    s|d d         dk    rS|d d         t          j                            t          j                            ||dd                              z   ||<   u|S )Nr   r`   -L)	enumerateosre   normpathjoin)r0   ri   rj   idxis        r1   &compute_parameters_with_absolute_pathsz6FortranCompiler.compute_parameters_with_absolute_pathsT   s    // 	_ 	_FC!u}}"1"&'ebg.>.>rw||IWXYZY[Y[W\?]?].^.^&^s#r2   module_namec                    d|v r`|                                 }| j        dv r|                    dd          dz   }n@| j        dv r|                    dd          dz   }n|dz   }n|                                 dz   }|S )N_>   intel-clgccintel@z.smod>   pgiflang-z.mod)loweridreplace)r0   rt   sfilenames       r1   module_name_to_filenamez'FortranCompiler.module_name_to_filename\   s    +!!##Aw66699S#..8,,,99S#..7v:"((**V3Hr2   Tlibname
extra_dirslibtyper   lib_prefix_warningc                :    d}|                      ||||||          S Nzstop; end program)_find_library_impl)r0   r   r8   r   r   r   rQ   s          r1   find_libraryzFortranCompiler.find_libraryj   s&    "&&wZwPbcccr2   argsc                0    |                      ||d          S r   )_has_multi_argumentsr0   r   r8   s      r1   has_multi_argumentsz#FortranCompiler.has_multi_argumentso   s    ((s4GHHHr2   c                0    |                      ||d          S r   )_has_multi_link_argumentsr   s      r1   has_multi_link_argumentsz(FortranCompiler.has_multi_link_argumentsr   s    --dC9LMMMr2   'MutableKeyedOptionDictType'c                    t                                                      }|                     d          }t          j        |                     |          dddg          ||<   |S )Nstdz Fortran language standard to usenone)choices)r[   get_optionsform_compileropt_keyr   UserComboOptionmake_option_name)r0   optskeyr]   s      r1   r   zFortranCompiler.get_optionsu   si    ww""$$''..+!!#&&.H	  S	 r2   
expressionGT.Union[None, T.List[str], T.Callable[[CompileCheckMode], T.List[str]]]c                R    d| d| d}|                      ||||          d         S )Nprogram test
            z%
            real(merge(kind(1.),-1,(z4))), parameter :: fail = 1.
        end program testr3   r   )compiles)r0   r   r7   r8   r4   r5   ts          r1   _compile_intzFortranCompiler._compile_int   sV    
 %/   }}Q
*6  8 889; 	;r2   lowT.Optional[int]highguessintc	                   t          |t                    r |                     | d| ||||          r|S d}	d}
t          |t                    rt          |t                    s	|                     | d||||          rxdx}}|                     | d| ||||          rS|dz   }||	k    rt          j        d          t          |d	z  dz   |	          }|                     | d| ||||          S|}nd
x}}|                     | d| ||||          rP|dz
  }||
k     rt          j        d          t          |d	z  |
          }|                     | d| ||||          P|}nT||k     rt          j        d          | d| d| d| }|                     |||||          st          j        d          ||k    rD|t          ||z
  d	z            z   }|                     | d| ||||          r|}n|dz   }||k    D|S )Nz == ii   z >= 0r   z > r   zCross-compile check overflowedr   z < z!high limit smaller than low limitz <= z .and. z >= zValue out of given range)
isinstancer   r   r   EnvironmentExceptionminmax)r0   r   r   r   r   r7   r8   r4   r5   maxintminintcur	conditions                r1   cross_compute_intz!FortranCompiler.cross_compute_int   s    eS!! 	  J!;!;E!;!;VS*Vbcc  #s## 	P:dC+@+@ 	P  J!5!5!5vsJP\]] c'':(?(?#(?(?jZfgg 3'CV||&;<\]]]cAgk622C	 '':(?(?#(?(?jZfgg 3
 s'':(?(?#(?(?jZfgg /7Df}}&;<\]]]cAgv..C	 '':(?(?#(?(?jZfgg /
  czz34WXXX%MM4MM
MMMMI$$YZVV P34NOOO TkkTCZ1,---C  J!9!9C!9!963
T`aa Ag Tkk 
r2   )r5   c          
        |g }| j         r|                     ||||||||          S d| d| d}	|                     |	|||          }
|
j        sdS |
j        dk    rt          j        d          t          |
j                  S )Nr   z
            print '(i0)', z"
        end program test
        r3   r   r   z&Could not run compute_int test binary.)	r%   r   runcompiled
returncoder   r   r   stdout)r0   r   r   r   r   r7   r8   r4   r5   r   ress              r1   compute_intzFortranCompiler.compute_int   s     J= 	o))*c4PSU_amnnn %  
 hhq#*$0  2 2| 	2>Q/0XYYY3:r2   typenamec          
         |g }d| d| d}|                      ||||          d         sdS |                     dd d d |dz   |z   d	z   |||          S )
N7program test
            use iso_c_binding
            
            z/ :: something
        end program test
        r3   r   r   zc_sizeof(x)z
use iso_c_binding
z :: x)r   r   )r0   r   r7   r8   r4   r5   r   s          r1   cross_sizeofzFortranCompiler.cross_sizeof   s     J     }}Q
*6  8 889; 	2%%mT4vPgGgjrGru|G|  B  DN  P\  ]  ]  	]r2   T.Tuple[int, bool]c                  |g }| j         r|                     |||||          }|dfS d| d| d}|                     ||||          }|j        sdS |j        dk    rt          j        d          t          |j                  |j	        fS )	Nr3   Fr   r   zM :: x
            print '(i0)', c_sizeof(x)
        end program test
        )r   Fr   z!Could not run sizeof test binary.)
r%   r   
cached_runr   r   r   r   r   r   cached)	r0   r   r7   r8   r4   r5   rr   r   s	            r1   sizeofzFortranCompiler.sizeof   s     J= 	!!(FCJ/; " = =Ae8O     ooa+7  9 9| 	9>Q/0STTT3:
**r2   c                D    |                      dd|          d         dk    S )zP
        returns true if the output produced is 64-bit, false if 32-bit
        ztype(c_ptr) r      )r   r0   r8   s     r1   output_is_64bitzFortranCompiler.output_is_64bit   s$    
 {{="c2215::r2   NNr    r!   r"   r#   r$   r   r%   r&   r'   r(   r)   r*   r+   r,   )r6   r#   r7   r#   r8   r9   r4   r:   r5   r;   r<   r=   )r8   r9   r@   r
   r<   rA   )rK   r#   rL   r9   r<   rM   )rS   r#   r<   r!   )rV   r&   r<   r!   r<   r!   r<   r^   re   r#   r<   r!   )ri   r!   rj   r#   r<   r!   )rt   r#   r<   r#   )r   r#   r8   r9   r   r!   r   r   r   r&   r<   r:   )r   r!   r8   r9   r<   r=   r<   r   )r   r#   r7   r#   r8   r9   r4   r   r5   r;   r<   r&   )r   r#   r   r   r   r   r   r   r7   r#   r8   r9   r4   r   r5   r;   r<   r   )r   r#   r7   r#   r8   r9   r4   r   r5   r;   r<   r   )r   r#   r7   r#   r8   r9   r4   r   r5   r;   r<   r   )r8   r9   r<   r&   )__name__
__module____qualname__rF   r.   r?   rJ   rR   rU   rX   r\   rc   rh   rs   r   r   PREFER_SHAREDr   r   r   r   r   r   r   r   r   	functools	lru_cacher   __classcell__r]   s   @r1   r   r   '   s       H 8<15% % % % % <@FJg g g g g g   
Q Q Q Q
9 9 9 9* * * *= = = = = =   ! ! ! !       )0(=Z^d d d d d
I I I IN N N N
 
 
 
 
 

; 
; 
; 
; quKO0 0 0 0 0j FJ     , lpFJ] ] ] ] ] ]" fj@D+ + + + + +0 Y; ; ; ; ; ; ; ;r2   r   c                  d     e Zd Z	 	 	 d.d/dZd0 fdZd1d2dZd3dZd4d Zd5d"Zddd#d$d6d-Z	 xZ
S )7GnuFortranCompilerNr    r!   r"   r#   r$   r   r%   r&   r'   r(   definesT.Optional[T.Dict[str, str]]r)   r*   r+   r,   c	           
         t                               | |||||||           t          j        | |           dg}	g |	|	dgz   |	g dz   |	g dz   d| _        d S )Nr)   r+   -Wall-Wextra)r   z
-Wpedanticz-fimplicit-none0123
everything)r   r.   r   	warn_args)
r0   r    r"   r$   r%   r'   r   r)   r+   default_warn_argss
             r1   r.   zGnuFortranCompiler.__init__  s    
 	  w!)4.: 	! 	< 	< 	< 	T7+++$I!00I;>03_3_3__(9<h<h<h(h	j jr2   r<   r   c                    t                                                      }g d}t          | j        d          r|dgz  }t          | j        d          r|dgz  }|                     ||           |S )N)legacyf95f2003z>=4.4.0f2008z>=8.0.0f2018)r[   r   r   r"   _update_language_stds)r0   r   fortran_stdsr]   s      r1   r   zGnuFortranCompiler.get_options  s~    ww""$$1114<33 	&WI%L4<33 	&WI%L""4666r2   targetr   r8   r   
subprojectc                    g }|                      d|||          }t          |t                    sJ |dk    r|                    d|z              |S )Nr   r   z-std=get_compileropt_valuer   r#   append)r0   r   r8   r   r   r   s         r1   get_option_std_argsz&GnuFortranCompiler.get_option_std_args   sZ    ((VZHH#s#####&==KK#&&&r2   	outtargetoutfilec                    g S rC   ra   r0   r   r   s      r1   get_dependency_gen_argsz*GnuFortranCompiler.get_dependency_gen_args(  s	     	r2   re   c                    d|z   gS Nz-Jra   rg   s     r1   rh   z)GnuFortranCompiler.get_module_outdir_args.      t}r2   r9   c                v    g }|                      |d          D ]}|                    d|            |ddgz   S )N	librariesrl   z
-lgfortranz-lmget_compiler_dirsr   r0   r8   search_dirsds       r1   language_stdlib_only_link_flagsz2GnuFortranCompiler.language_stdlib_only_link_flags1  sU    
 $&''[99 	) 	)AxAxx((((lE222r2   F)r4   r5   disable_cachehnamer7   r4   IT.Union[None, T.List[str], T.Callable[['CompileCheckMode'], T.List[str]]]r5   r;   r
  r=   c               \    | d| d}|                      ||||t          j        |          S )z
        Derived from mixins/clike.py:has_header, but without C-style usage of
        __has_include which breaks with GCC-Fortran 10:
        https://github.com/mesonbuild/meson/issues/7017
        z
#include <>)r4   r5   r@   r
  )r   r
   
PREPROCESS)r0   r  r7   r8   r4   r5   r
  rQ   s           r1   
has_headerzGnuFortranCompiler.has_header;  sJ     ..e...}}T3:*6=M=Xhu  w w 	wr2   NNNr    r!   r"   r#   r$   r   r%   r&   r'   r(   r   r   r)   r*   r+   r,   r   rC   r   r   r8   r   r   r,   r<   r!   r   r#   r   r#   r<   r!   r   r8   r9   r<   r!   )r  r#   r7   r#   r8   r9   r4   r  r5   r;   r
  r&   r<   r=   )r   r   r   r.   r   r   r   rh   r	  r  r   r   s   @r1   r   r     s         :>7;15	j j j j j                3 3 3 3 lpDH).w w w w w w w w w wr2   r   c                  8     e Zd Z	 	 	 dddZd fdZddZ xZS )ElbrusFortranCompilerNr    r!   r"   r#   r$   r   r%   r&   r'   r(   r   r   r)   r*   r+   r,   c	           
     r    t                               | |||||||           t          j        |            d S )Nr   )r   r.   r   )	r0   r    r"   r$   r%   r'   r   r)   r+   s	            r1   r.   zElbrusFortranCompiler.__init__J  sL    
 	  wh!%f< 	! 	Q 	Q 	Q%%%%%r2   r<   r   c                x    t                                                      }|                     |g d           |S )N)r   r   r   gnur   f2008tsr[   r   r   r0   r   r]   s     r1   r   z!ElbrusFortranCompiler.get_optionsS  s:    ww""$$""4)^)^)^___r2   re   c                    d|z   gS r   ra   rg   s     r1   rh   z,ElbrusFortranCompiler.get_module_outdir_argsX  r  r2   r  r  r   r   )r   r   r   r.   r   rh   r   r   s   @r1   r  r  I  su         :>7;15	& & & & &     
       r2   r  c                  ,    e Zd ZdZdZ	 	 dddZddZdS )G95FortranCompiler-Wl,g95Nr    r!   r"   r#   r$   r   r%   r&   r'   r(   r)   r*   r+   r,   c           
         t                               | |||||||           dg}g ||dgz   |ddgz   |ddgz   d| _        d S )Nr   r   r   z	-pedanticr   r   r.   r   	r0   r    r"   r$   r%   r'   r)   r+   r   s	            r1   r.   zG95FortranCompiler.__init__a  s{     	  w!)4.: 	! 	< 	< 	< %I!00I;>0I{3KK(9Y<T(T	V Vr2   re   r<   c                    d|z   gS )Nz-fmod=ra   rg   s     r1   rh   z)G95FortranCompiler.get_module_outdir_argso  s    4  r2   r   r   r   )r   r   r   LINKER_PREFIXr   r.   rh   ra   r2   r1   r   r   \  sX        M	B 8<15V V V V V! ! ! ! ! !r2   r   c                  F    e Zd ZdZdZddZdd	ZddZddZddZ	ddZ
dS )SunFortranCompilerr!  sunr   r#   r   r<   r!   c                    dgS Nz-fppra   r   s      r1   r   z*SunFortranCompiler.get_dependency_gen_argsx  	    xr2   c                    g S rC   ra   rb   s    r1   get_always_argsz"SunFortranCompiler.get_always_args{      	r2   levelc                    g S rC   ra   )r0   r1  s     r1   get_warn_argsz SunFortranCompiler.get_warn_args~  r0  r2   r^   c                    dS )N)z-Mra   rb   s    r1   rc   z)SunFortranCompiler.get_module_incdir_args  rd   r2   re   c                    d|z   gS )Nz-moddir=ra   rg   s     r1   rh   z)SunFortranCompiler.get_module_outdir_args      T!""r2   r8   r   c                    dgS )Nz-xopenmpra   r   s     r1   openmp_flagszSunFortranCompiler.openmp_flags  s
    |r2   Nr  r   )r1  r#   r<   r!   r   r   r8   r   r<   r!   )r   r   r   r'  r   r   r/  r3  rc   rh   r8  ra   r2   r1   r)  r)  s  s        M	B            # # # #     r2   r)  c                  \     e Zd ZdZ	 	 d"d#dZd$ fdZd%d&dZd'dZd'dZd(dZ	d)d!Z
 xZS )*IntelFortranCompilerry   Nr    r!   r"   r#   r$   r   r%   r&   r'   r(   r)   r*   r+   r,   c           
         t                               | |||||||           t          j        |            d| _        g d}g ||ddgz   ddgddgd| _        d S )Nr   f90fforftnfpp)-warngeneralrC  truncated_sourcerC  unusedallr   )r   r.   r   file_suffixesr   r%  s	            r1   r.   zIntelFortranCompiler.__init__  s     	  w!)4.: 	! 	< 	< 	<
 	%d+++@MMM!00GX3FF '/)0%(8	: :r2   r<   r   c                x    t                                                      }|                     |g d           |S N)r   r   r   r   r   r   r  r  s     r1   r   z IntelFortranCompiler.get_options  :    ww""$$""4)])])]^^^r2   r   r   r8   r   r   c                    g }|                      d|||          }dddddd}t          |t                    sJ |dk    r|                    d||         z              |S )	Nr   r   r   f03f08f18r   r   r   r   r   z-stand=r   r0   r   r8   r   r   r   stdss          r1   r   z(IntelFortranCompiler.get_option_std_args  s    ((VZHH Y^__#s#####&==KK	DI-...r2   c                
    ddgS )NrZ   z-EPra   rb   s    r1   r\   z-IntelFortranCompiler.get_preprocess_only_args  s    r2   c                
    ddgS )NrC  errorsra   rb   s    r1   get_werror_argsz$IntelFortranCompiler.get_werror_args  s    ""r2   r9   c                
    ddgS )Nz-lifcorez-limfra   r   s     r1   r	  z4IntelFortranCompiler.language_stdlib_only_link_flags  s    G$$r2   r   r   c                    d|z   dgS )Nz	-gen-dep=z-gen-depformat=makera   r   s      r1   r   z,IntelFortranCompiler.get_dependency_gen_args  s    i')>??r2   r   r   r   rC   r  r   r  r  )r   r   r   r   r.   r   r   r\   rW  r	  r   r   r   s   @r1   r;  r;    s        	B 8<15: : : : :$     
       # # # #% % % %@ @ @ @ @ @ @ @r2   r;  c                      e Zd ZdZdS )IntelLLVMFortranCompilerz
intel-llvmNr   r   r   r   ra   r2   r1   r[  r[    s        	BBBr2   r[  c                  N     e Zd ZdgZ	 	 dddZd  fdZd!d"dZd#dZd$dZ xZ	S )%IntelClFortranCompilerz/nologoNr    r!   r"   r#   r$   r   r%   r&   r'   r(   r   r)   r*   r+   r,   c	           
         t                               | |||||||           t          j        | |           d| _        ddg}	g |	|	dgz   dgdgd| _        d S )Nr   r=  z/warn:generalz/warn:truncated_sourcez/warn:unusedz	/warn:allr   )r   r.   r   rH  r   )
r0   r    r"   r$   r%   r'   r   r)   r+   r   s
             r1   r.   zIntelClFortranCompiler.__init__  s     	  w!)4.: 	! 	< 	< 	< 	&.tV<<<@,.FG!00N3CC +})4	7 7r2   r<   r   c                x    t                                                      }|                     |g d           |S rJ  r  r  s     r1   r   z"IntelClFortranCompiler.get_options  rK  r2   r   r8   r   r   c                    g }|                      d|||          }dddddd}t          |t                    sJ |dk    r|                    d||         z              |S )	Nr   r   r   rM  rN  rO  rP  z/stand:r   rQ  s          r1   r   z*IntelClFortranCompiler.get_option_std_args  rS  r2   c                    dgS )Nz/warn:errorsra   rb   s    r1   rW  z&IntelClFortranCompiler.get_werror_args  s    r2   re   c                    d|z   gS )Nz/module:ra   rg   s     r1   rh   z-IntelClFortranCompiler.get_module_outdir_args  r6  r2   r   )r    r!   r"   r#   r$   r   r%   r&   r'   r(   r   r#   r)   r*   r+   r,   r   rC   r  r   r   )
r   r   r   always_argsr.   r   r   rW  rh   r   r   s   @r1   r^  r^    s        +K 8<157 7 7 7 7"     
           # # # # # # # #r2   r^  c                      e Zd ZdZdS )IntelLLVMClFortranCompilerzintel-llvm-clNr\  ra   r2   r1   rf  rf    s        	BBBr2   rf  c                  (    e Zd ZdZ	 	 dddZddZdS )PathScaleFortranCompiler	pathscaleNr    r!   r"   r#   r$   r   r%   r&   r'   r(   r)   r*   r+   r,   c           
     j    t                               | |||||||           dg}g ||||d| _        d S Nr   z	-fullwarnr   r$  r%  s	            r1   r.   z!PathScaleFortranCompiler.__init__  ^     	  w!)4.: 	! 	< 	< 	< )M!000(9	; ;r2   r8   r   r<   c                    dgS Nz-mpra   r   s     r1   r8  z%PathScaleFortranCompiler.openmp_flags  	    wr2   r   r   r9  r   r   r   r   r.   r8  ra   r2   r1   rh  rh    sN        	B 8<15; ; ; ; ;     r2   rh  c                  $    e Zd Z	 	 dddZddZdS )PGIFortranCompilerNr    r!   r"   r#   r$   r   r%   r&   r'   r(   r)   r*   r+   r,   c           
         t                               | |||||||           t          j        |            dg}g |||dgz   |dgz   d| _        d S Nr   -Minform=informz-Mdclchkr   r   r.   r   r   r%  s	            r1   r.   zPGIFortranCompiler.__init__       	  w!)4.: 	! 	< 	< 	< 	T"""./!000J<?(9ZL(H	J Jr2   r8   r9   r<   c                
    g dS )N)
-lpgf90rtlz-lpgf90z-lpgf90_rpm1z-lpgf902ry  z
-lpgftnrtlz-lrtra   r   s     r1   r	  z2PGIFortranCompiler.language_stdlib_only_link_flags  s    4 4 4 	4r2   r   r   r  )r   r   r   r.   r	  ra   r2   r1   rr  rr    sN         8<15J J J J J 4 4 4 4 4 4r2   rr  c                       e Zd ZdZ	 	 dddZdS )NvidiaHPC_FortranCompiler
nvidia_hpcNr    r!   r"   r#   r$   r   r%   r&   r'   r(   r)   r*   r+   r,   c           
         t                               | |||||||           t          j        |            dg}g |||dgz   |dgz   d| _        d S rt  rv  r%  s	            r1   r.   z"NvidiaHPC_FortranCompiler.__init__"  rw  r2   r   r   )r   r   r   r   r.   ra   r2   r1   r{  r{    sA        	B 8<15J J J J J J Jr2   r{  c                  (    e Zd ZdZ	 	 dddZddZdS )ClassicFlangFortranCompilerr|   Nr    r!   r"   r#   r$   r   r%   r&   r'   r(   r)   r*   r+   r,   c           
         t                               | |||||||           t          j        | i            dg}g ||||d| _        d S )Nr   ru  r   r   r.   r   r   r%  s	            r1   r.   z$ClassicFlangFortranCompiler.__init__7  sr     	  w!)4.: 	! 	< 	< 	< 	tR(((./!000(9	; ;r2   r8   r9   r<   c                v    g }|                      |d          D ]}|                    d|            |ddgz   S )Nr  rl   z-lflangz-lpgmathr  r  s       r1   r	  z;ClassicFlangFortranCompiler.language_stdlib_only_link_flagsF  sU     $&''[99 	) 	)AxAxx((((i444r2   r   r   r  )r   r   r   r   r.   r	  ra   r2   r1   r  r  3  sN        	B 8<15; ; ; ; ;	5 	5 	5 	5 	5 	5r2   r  c                      e Zd ZdZdS )ArmLtdFlangFortranCompilerarmltdflangNr\  ra   r2   r1   r  r  R  s        	BBBr2   r  c                  H    e Zd ZdZ	 	 dd dZd!dZd"dZd#dZd$dZd%dZ	dS )&LlvmFlangFortranCompilerz
llvm-flangNr    r!   r"   r#   r$   r   r%   r&   r'   r(   r)   r*   r+   r,   c           
         t                               | |||||||           t          j        | i            dg}g ||||d| _        d S )Nr   r   r   r  r%  s	            r1   r.   z!LlvmFlangFortranCompiler.__init__[  sq     	  w!)4.: 	! 	< 	< 	< 	tR((($I!000(9	; ;r2   	colortyper<   c                    g S rC   ra   )r0   r  s     r1   get_colorout_argsz*LlvmFlangFortranCompiler.get_colorout_argsi      	r2   r   r   c                    g S rC   ra   r   s      r1   r   z0LlvmFlangFortranCompiler.get_dependency_gen_argsm  r  r2   re   c                
    d|gS )Nz-module-dirra   rg   s     r1   rh   z/LlvmFlangFortranCompiler.get_module_outdir_argsq  s     t$$r2   vistypec                    g S rC   ra   )r0   r  s     r1   gnu_symbol_visibility_argsz3LlvmFlangFortranCompiler.gnu_symbol_visibility_argsv  s	     	r2   r8   r9   c                    g }|                      |d          D ]}|                    d|            t          | j        d          r|ddgz  }|S )Nr  rl   z<19z-lFortranRuntimez-lFortranDecimal)r  r   r   r"   r  s       r1   r	  z8LlvmFlangFortranCompiler.language_stdlib_only_link_flags{  sq    #%''[99 	) 	)AxAxx(((( 4<// 	D.0BCCKr2   r   r   )r  r#   r<   r!   r  r   )r  r#   r<   r!   r  )
r   r   r   r   r.   r  r   rh   r  r	  ra   r2   r1   r  r  W  s        	B MQ15; ; ; ; ;      % % % %
   
     r2   r  c                  (    e Zd ZdZ	 	 dddZddZdS )Open64FortranCompileropen64Nr    r!   r"   r#   r$   r   r%   r&   r'   r(   r)   r*   r+   r,   c           
     j    t                               | |||||||           dg}g ||||d| _        d S rk  r$  r%  s	            r1   r.   zOpen64FortranCompiler.__init__  rl  r2   r8   r   r<   c                    dgS rn  ra   r   s     r1   r8  z"Open64FortranCompiler.openmp_flags  ro  r2   r   r   r9  rp  ra   r2   r1   r  r    sN        	B 8<15; ; ; ; ;     r2   r  c                  h    e Zd ZdZ	 	 d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S )#NAGFortranCompilernagforNr    r!   r"   r#   r$   r   r%   r&   r'   r(   r)   r*   r+   r,   c           
     f    t                               | |||||||           dgg g g g d| _        d S )Nr   z-w=allr   r$  r/   s           r1   r.   zNAGFortranCompiler.__init__  sX     	  w!)4.: 	! 	< 	< 	<
 
 
r2   r<   c                6    |                      | j                  S rC   )get_nagfor_quietr"   rb   s    r1   r/  z"NAGFortranCompiler.get_always_args  s    $$T\222r2   re   c                
    d|gS )Nz-mdirra   rg   s     r1   rh   z)NAGFortranCompiler.get_module_outdir_args  s    r2   c                ,    t          | d          rdgng S )Nz>=7100z-quiet)r   )r"   s    r1   r  z#NAGFortranCompiler.get_nagfor_quiet  s    ,Wh??GzzRGr2   c                    dgS )Nz-PICra   rb   s    r1   get_pic_argszNAGFortranCompiler.get_pic_args  r-  r2   c                    dgS r,  ra   rb   s    r1   r\   z+NAGFortranCompiler.get_preprocess_only_args  r-  r2   c                *    |                                  S rC   )r/  rb   s    r1   get_std_exe_link_argsz(NAGFortranCompiler.get_std_exe_link_args  s    ##%%%r2   r8   r   c                    dgS )Nz-openmpra   r   s     r1   r8  zNAGFortranCompiler.openmp_flags  s
    {r2   r   r   r   r   )r"   r#   r<   r!   r9  )r   r   r   r   r.   r/  rh   staticmethodr  r  r\   r  r8  ra   r2   r1   r  r    s        	B 8<15
 
 
 
 
 3 3 3 3    H H H \H      & & & &     r2   r  )=
__future__r   typingTr   rn   r   r   r   	compilersr   r	   r
   mixins.cliker   
mixins.gnur   r   mixins.intelr   r   mixins.clangr   mixins.elbrusr   
mixins.pgir   mesonbuild.mesonlibr   r   r   TYPE_CHECKINGr   r5   r   	envconfigr   rL   r   linkers.linkersr   r   buildr   r   r   r  r   r)  r;  r[  r^  rf  rh  rr  r{  r  r  r  r  r  ra   r2   r1   <module>r     s   # " " " " "         				                     
 ( ' ' ' ' ' ; ; ; ; ; ; ; ; M M M M M M M M ' ' ' ' ' ' ) ) ) ) ) ) # # # # # #         
 ? $444444))))))''''''))))))//////((((((######Z; Z; Z; Z; Z;mX Z; Z; Z;zBw Bw Bw Bw Bwo Bw Bw BwJ    NO   &! ! ! ! ! ! ! !.       0/@ /@ /@ /@ /@/ /@ /@ /@d    3   
'# '# '# '# '#:O '# '# '#T    !7          ,4 4 4 4 4o 4 4 40J J J J J_ J J J*5 5 5 5 5- 5 5 5>    !<   
3 3 3 3 3}o 3 3 3l    O   ,( ( ( ( ( ( ( ( ( (r2   