zmc
2023-12-22 9fdbf60165db0400c2e8e6be2dc6e88138ac719a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
U
O±dpã@sÂddlZddlmZddlmZddlmZmZmZddgZGdd„deƒZ    ddl
Z
Gdd„deƒZ e d    kr¾dd
l mZe d ¡dd lmZd ejkr¬eed d ¡ƒneedd ¡ƒdS)éN)Ú    FCompiler)Úplatform)ÚjoinÚdirnameÚnormpathÚPGroupFCompilerÚPGroupFlangCompilerc@sÆeZdZdZdZdZedkrRddgddgdd    dgddgd
gd d gd gdœZdgZn.ddgdgdd    gdgdgd d gd gdœZdgZdZ    dZ
dd„Z dd„Z dd„Z edkr²dd„Zndd„Zdd„ZdS) rÚpgzPortland Group Fortran Compilerz1\s*pg(f77|f90|hpf|fortran) (?P<version>[\d.-]+).*Údarwinú<F77>z-VZ    pgfortranz -dynamiclibz-MfixedZlibtoolÚarz-crÚranlib©Z version_cmdÚ compiler_f77Z compiler_fixZ compiler_f90Ú    linker_soÚarchiverr Úz<F90>ú-fpicú-module z-IcCsddg}|j|S)Nz-Minform=informz-Mnosecond_underscore)Ú    pic_flags©ÚselfÚopt©rúSd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\numpy/distutils/fcompiler/pg.pyÚ    get_flags+szPGroupFCompiler.get_flagscCsdgS)Nz-fastr©rrrrÚ get_flags_opt/szPGroupFCompiler.get_flags_optcCsdgS©Nz-grrrrrÚget_flags_debug2szPGroupFCompiler.get_flags_debugcCs
dddgS)Nz-dynamicz
-undefinedZdynamic_lookuprrrrrÚget_flags_linker_so6sz#PGroupFCompiler.get_flags_linker_socCsddgS)Nz-sharedrrrrrrr :scCsd|S)Nz-R%sr©rÚdirrrrÚruntime_library_dir_option=sz*PGroupFCompiler.runtime_library_dir_optionN)Ú__name__Ú
__module__Ú __qualname__Ú compiler_typeÚ descriptionÚversion_patternrÚ executablesrÚmodule_dir_switchZmodule_include_switchrrrr r#rrrrr s>ù    ù    
c@sœeZdZdZdZdZdZdgZddgdgdgdgdgedd    gdd
œZd    Z    d Z
d d „Z e j dddd„ƒZdd„Zdd„Zdd„Zdd„Zdd„Zdd„ZdS)rÚflangz$Portland Group Fortran LLVM Compilerz/\s*(flang|clang) version (?P<version>[\d.-]+).*zlib.exer z    --versionNz/verbosez/OUT:rrcCst |¡}| dddg¡|S)Nr,ZflangrtiZompstub)rÚ get_librariesÚextendrrrrr-Xs
z!PGroupFlangCompiler.get_librariesé€)ÚmaxsizecCs6t |¡}t|jddƒ}| tt|ddƒƒ¡|S)z%List of compiler library directories.rrz..Úlib)rÚget_library_dirsrr*Úappendrr)rrZ    flang_dirrrrr2]s
z$PGroupFlangCompiler.get_library_dirscCsgS©NrrrrrrfszPGroupFlangCompiler.get_flagscCsgSr4rrrrrÚget_flags_freeisz"PGroupFlangCompiler.get_flags_freecCsdgSrrrrrrrlsz#PGroupFlangCompiler.get_flags_debugcCsdgS)Nz-O3rrrrrrosz!PGroupFlangCompiler.get_flags_optcCsgSr4rrrrrÚget_flags_archrsz"PGroupFlangCompiler.get_flags_archcCst‚dSr4)ÚNotImplementedErrorr!rrrr#usz.PGroupFlangCompiler.runtime_library_dir_option)r$r%r&r'r(r)Zar_exeZpossible_executablesr*Zlibrary_switchr+r-Ú    functoolsÚ    lru_cacher2rr5rrr6r#rrrrrCs0ù
 
 
Ú__main__)Úlogé)Úcustomized_fcompilerr,)Úcompilerr    )ÚsysZnumpy.distutils.fcompilerrrÚos.pathrrrZ    compilersrr8rr$Ú    distutilsr;Ú set_verbosityZnumpy.distutilsr=ÚargvÚprintÚ get_versionrrrrÚ<module>s  66