
    |hy                        S SK r S SKrS SKJr  S SKJrJr  S SKJr  S\R                  R                  l        \\R                  R                  l        S\R                  R                  l        \\R                  R                  l        S\R                  R                  l        \\R                  R                  l        S\R                  R                  l        \\R                  R                  l        S\R                  R                   l        \\R                  R                   l        S r\" 5       rS r\" 5       rS r\" 5       rS	 r\" 5       rS
 r\" 5       r\S 5       rg)    N)cache)c_intc_char_p)ffi c                  J    [         R                  R                  5       S:X  a  gg)z?
Returns True if SVML was enabled at FFI support compile time.
r   FT)r   libLLVMPY_HasSVMLSupportr       Q/home/james-whalen/.local/lib/python3.13/site-packages/llvmlite/binding/config.py	_has_svmlr      s     ww$$&!+r   c                  J    [         R                  R                  5       S:X  a  gg)ze
Returns "static" if the FFI support is statically linked against LLVM,
returns "dynamic" otherwise.
r   staticdynamic)r   r	    LLVMPY_IsDynamicLLVMLinkageBuildr   r   r   _build_llvm_linkage_typer   &   s    
 ww//1Q6r   c                  J    [         R                  R                  5       S:X  a  gg)zj
Returns "static" if the FFI support is statically linked against libstdc++,
returns "dynamic" otherwise.
   r   r   )r   r	   $LLVMPY_IsStaticLibstdcxxLinkageBuildr   r   r   _build_libstdcxx_linkage_typer   4   s    
 ww335:r   c                  Z    [         R                  R                  5       R                  5       $ )z+
Returns "wheel", "conda" or "unspecified"
)r   r	   LLVMPY_PackageFormatdecoder   r   r   _package_formatr   B   s      77'')0022r   c                  Z    [         R                  R                  5       R                  5       $ )a  
Returns one of "on", "off" or "unknown". Depending on whether it is
determined that LLVM was build with assertions on, off, or is not known.
"Is not known" is typically from a dynamic linkage against LLVM in which
case it's not easily identified whether LLVM was built with assertions.
)r   r	   LLVMPY_LlvmAssertionsStater   r   r   r   _llvm_assertions_stater   L   s      77--/6688r   c                     [        5       n [        R                  R                  U S'   [        U S'   [
        U S'   [        U S'   [        U S'   Sn SS KnSnXS
'   S U S'   S U S'   S nS nU(       a5  WR                  U S   5      n[        U" U5      5      nXpS'   U" U5      nXS'   U $ ! [         a    S	n[        R                  " U5         Nvf = f)Nffi_lib_locationpackage_formatllvm_linkage_typelibstdcxx_linkage_typellvm_assertions_stateFr   Tz9py-lief package not found, sysinfo is limited as a resultlief_probe_statuslinked_librariescanonicalised_linked_librariesc                 \    U R                    Vs/ s H  n[        USU5      PM     sn$ s  snf )zRCanonicalises the representation of the binary::libraries as a
sequence of stringsname)	librariesgetattr)dsoxs     r   canonicalise_library_type.get_sysinfo.<locals>.canonicalise_library_typeo   s)     03}}=}!61%}===s   )c                 
   / nU  Hz  n[         R                  R                  U5      S   nUR                  S5      S   nUR                  SS5      R                  SS5      nUR	                  UR                  5       5        M|     U$ )N.r   r	    LIB)ospathsplitreplaceappendlower)libsfixesr	   path_strippedprefix_libnamelinker_names         r   canonicalise_library_spelling2get_sysinfo.<locals>.canonicalise_library_spellingw   s~     C GGMM#.r2M +005a8N(00;CCE2NKLL**,-  r   )dictr   r	   _namer    build_llvm_linkage_typebuild_libstdcxx_linkage_typer#   liefImportErrorwarningswarnparsetuple)	d	HAVE_LIEFrE   msgr-   r?   r+   	link_libscanonicalised_libss	            r   get_sysinforP   Y   s    AGGMMA(A4A">A!6A I	
 ' A*.A&'>" jj-./3C89	 )
:9E.@
*+HQ  Ics   B' '"CC)r4   rG   	functoolsr   ctypesr   r   llvmlite.bindingr   r	   r
   argtypesrestyper   r   r   r   r   has_svmlr   rC   r   rD   r   r    r   r#   rP   r   r   r   <module>rW      s+   	   "   *,   &(-   %8: , , 57< , , 446 ( ( 138 ( ( 0(*   %'/   $.0 " " +-5 " " * ; 34   => 3 !"9 /0  5 5r   