+
    UBi                       ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt	^ RI
t
^ RIHt ^RIHtHt ^RIHt ^RIHtHtHt ^RIHtHtHtHtHtHtHtHt ^RIHt ^R	I H!t! ^R
I"H#t# ^RI$H%t% ^RI&H't' ^RI(H)t) ]	PT                  '       d%   ^RI+H,t, ^RI-H.t. ^RI/H0t0 ^RIH1t1 ^RI2H3t3 ^RIH4t4 R R lt5 ! R R]4      t6 ! R R])4      t7 ! R R]4      t8 ! R R])4      t9 ! R R]!4      t: ! R  R!]4      t; ! R" R#])4      t<]<]#R$&    ! R% R&]4      t= ! R' R(]4      t>]>]#R)&    ! R* R+]>4      t?]?]#R,&    ! R- R.]4      t@]@]#R/&   ]%! R0]P                  ]P                  .];]:R17      ;]#R2&   tC]%! R3]P                  ]P                  .]7]6R47      ;]#R3&   tF]%! R5]P                  ]P                  .]9]8R47      ;]#R5&   tG]%! R6]P                  ]P                  ]P                  .R7]=R87      ;]#R6&   tHR# )9    )annotationsN)FeatureDeprecated)mesonlibmlog)get_llvm_tool_names)version_compareversion_compare_manysearch_version)DependencyExceptionDependencyMethodsdetect_compilerstrip_system_includedirsstrip_system_libdirsSystemDependencyExternalDependencyDependencyTypeName)CMakeDependency)ConfigToolDependency)packages)DependencyFactory)threads_factory)PkgConfigDependency)MachineInfo)Environment)Compiler)MachineChoice)PkgConfigDefineType)DependencyObjectKWsc               $    V ^8  d   QhRRRRRR/# )   environment'Environment'for_machiner   returnstr )formats   "@/usr/lib/python3.14/site-packages/mesonbuild/dependencies/dev.py__annotate__r)   %   s"     	 	= 	} 	Y\ 	    c                    V P                   V,          pVP                  4       '       d   R# VP                  4       '       d   R# R# )zThis is only guaranteed to work for languages that compile to machine
code, not for languages like C# that use a bytecode and always end in .dll
.dllz.dylib.so)machines
is_windows	is_darwin)r!   r#   ms   && r(   get_shared_library_suffixr2   %   s3     	[)A||~~	
r*   c                  R   a  ] tR t^1tR V 3R lltR R ltR R ltR R ltR	tV ;t	# )
GTestDependencySystemc               (    V ^8  d   QhRRRRRRRR/# 	r    namer%   r!   r"   kwargsr   r$   Noner&   )r'   s   "r(   r)   "GTestDependencySystem.__annotate__2   s*     	 	S 	} 	FY 	^b 	r*   c                	z  < \         SV `  WVR R7       VP                  RR4      V n        VP                  V P
                  ,          P                  4       ;'       g    RpVR,           VR,           .V n        V P                  \        W P
                  / 4      4      '       g
   RV n
        R# V P                  4        R# )cpplanguagemainF z/usr/src/gtest/srcz"/usr/src/googletest/googletest/srcN)super__init__getr?   
propertiesr#   get_sys_rootsrc_dirs_add_sub_dependencyr   is_founddetect)selfr7   r!   r8   sysroot	__class__s   &&&& r(   rB   GTestDependencySystem.__init__2   s    FUCJJvu-	(()9)9:GGIOOR #77Cg9gh''EUEUWY(Z[[!DMr*   c                   V ^8  d   QhRR/# r    r$   r9   r&   )r'   s   "r(   r)   r:   =   s     " " "r*   c                	   V P                   P                  R . 4      pV P                   P                  R. 4      pV'       dj   V P                  '       d	   V'       dP   RV n        . V n        Wn        V P                  '       d   V ;P
                  V,          un        . V n        RV n        R# V P                  4       '       d   RV n        V P                   Uu. uF  pRV,           NK  	  upV n        . V n        V P                  '       d   V P                  V P                  .V n        MV P                  .V n        RV n        R# RV n        R# u upi )gtest
gtest_mainT-IFN)clib_compilerfind_libraryr?   rH   compile_args	link_argssourcesprebuiltdetect_srcdirsrc_include_dirsall_srcmain_src)rJ   gtest_detectgtest_main_detectds   &   r(   rI   GTestDependencySystem.detect=   s    ))66wC ..;;L"M.? DM "D)Nyyy"33DL DM!! DM373H3H I3Ha3H IDDNyyy $dmm< $~!DM!DM !Js   E
c                   V ^8  d   QhRR/# )r    r$   boolr&   )r'   s   "r(   r)   r:   T   s      t r*   c                	   V P                    EF\  p\        P                  P                  V4      '       g   K+  Wn        \
        P                  P                  \        P                  P                  V P                  R 4      4      V n	        \
        P                  P                  \        P                  P                  V P                  R4      4      V n
        \        P                  P                  \        P                  P                  V P                  R4      4      \        P                  P                  \        P                  P                  V P                  R4      4      .V n         R# 	  R# )zgtest-all.cczgtest_main.cc..z
../includeTF)rF   ospathexistssrc_dirr   Filefrom_absolute_filejoinr\   r]   normpathr[   )rJ   ss   & r(   rZ   #GTestDependencySystem.detect_srcdirT   s    Aww~~a   '}}??GGLL~> @ ( @ @GGLL?!A)+)9)9"'',,t||UY:Z)[)+)9)9"'',,t||Ua:b)c)+%   r*   c                   V ^8  d   QhRR/# r    r$   r%   r&   )r'   s   "r(   r)   r:   b        # ## #r*   c                	.    V P                   '       d   R # R# rY   zbuilding selfrY   rJ   s   &r(   log_infoGTestDependencySystem.log_infob       ==="r*   )r\   rV   rH   rW   r?   r]   rY   rX   ri   rF   r[   )
__name__
__module____qualname____firstlineno__rB   rI   rZ   rw   __static_attributes____classcell__rL   s   @r(   r4   r4   1   s!    	 	".# #r*   r4   c                  .   a  ] tR t^itR V 3R lltRtV ;t# )GTestDependencyPCc               $    V ^8  d   QhRRRRRR/# r    r7   r%   r!   r"   r8   r   r&   )r'   s   "r(   r)   GTestDependencyPC.__annotate__k   "     4 4S 4} 4FY 4r*   c                	l   < VR 8X  g   Q hVP                  R4      '       d   Rp\        SV `	  WV4       R# )rQ   r?   rR   NrC   rA   rB   rJ   r7   r!   r8   rL   s   &&&&r(   rB   GTestDependencyPC.__init__k   2    w::fDF3r*   r&   rz   r{   r|   r}   rB   r~   r   r   s   @r(   r   r   i       4 4r*   r   c                  :   a  ] tR t^rtR V 3R lltR R ltRtV ;t# )GMockDependencySystemc               (    V ^8  d   QhRRRRRRRR/# r6   r&   )r'   s   "r(   r)   "GMockDependencySystem.__annotate__s   s*     1 1S 1} 1FY 1^b 1r*   c           
     	   < \         SV `  WVR R7       VP                  RR4      V n        V P	                  \        W P                  / 4      4      '       g
   RV n        R# VP                  4       pV P                  '       d   RVR&   V P	                  \        W P                  V4      4      pV'       g
   RV n        R# V P                  P                  R. 4      pV P                  P                  R. 4      pV'       do   V P                  '       d	   V'       dU   RV n        V ;P                  V,          un        V P                  '       d   V ;P                  V,          un        RV n        R# R EF  p\        P                  P!                  V4      '       g   K+  RV n        \        P                  P#                  \        P                  P%                  VR4      4      p	V ;P&                  R	V,           R	V	,           R	\        P                  P%                  V	R
4      ,           .,          un        \(        P*                  P-                  \        P                  P%                  VR4      4      p
\(        P*                  P-                  \        P                  P%                  VR4      4      pV P                  '       d   V ;P.                  W.,          un        MV ;P.                  V
.,          un        RV n         R# 	  RV n        R# )r<   r=   r?   FNgmock
gmock_mainTre   rS   includezgmock-all.cczgmock_main.cc)z"/usr/src/googletest/googlemock/srcz/usr/src/gmock/srcz/usr/src/gmock)rA   rB   rC   r?   rG   r   r#   rH   copygtest_factoryrT   rU   rW   rY   rf   rg   rh   rm   rl   rV   r   rj   rk   rX   )rJ   r7   r!   r8   gtest_kwargsfoundgmock_detectgmock_main_detectr`   d2r\   r]   rL   s   &&&&        r(   rB   GMockDependencySystem.__init__s   s   FUCJJvu-	''EUEUWY(Z[[!DM {{}999#(L 
 (({DTDTVb)cd!DM ))66wC ..;;L"M.? DMNNl*Nyyy"33 DM_Aww~~a   $ WW%%bggll1d&;<!!dQhr	4"'',,rS\B];]%^^!"--::277<<>;Z[#==;;BGGLLO<\]999LLW$77LLLWI-L % `  r*   c                   V ^8  d   QhRR/# rq   r&   )r'   s   "r(   r)   r      rr   r*   c                	.    V P                   '       d   R # R# rt   ru   rv   s   &r(   rw   GMockDependencySystem.log_info   ry   r*   )rH   r?   rY   )rz   r{   r|   r}   rB   rw   r~   r   r   s   @r(   r   r   r   s    1 1f# #r*   r   c                  .   a  ] tR t^tR V 3R lltRtV ;t# )GMockDependencyPCc               $    V ^8  d   QhRRRRRR/# r   r&   )r'   s   "r(   r)   GMockDependencyPC.__annotate__   r   r*   c                	l   < VR 8X  g   Q hVP                  R4      '       d   Rp\        SV `	  WV4       R# )r   r?   r   Nr   r   s   &&&&r(   rB   GMockDependencyPC.__init__   r   r*   r&   r   r   s   @r(   r   r      r   r*   r   c                     a  ] tR t^tRtRtR0tR V 3R lltR R ltR R	 lt	R
 R lt
R R ltRR R lltR R ltRtV ;t# )LLVMDependencyConfigToolzy
LLVM uses a special tool, llvm-config, which has arguments for getting
c args, cxx args, and ldargs as well as version.
llvm-configz-DNDEBUGc               $    V ^8  d   QhRRRRRR/# r   r&   )r'   s   "r(   r)   %LLVMDependencyConfigTool.__annotate__   s"     ' 'S '} 'FY 'r*   c                	  < \        R 4      V n        VP                  VP                  R\        P
                  P                  4      ,          P                  '       d   V P                  P                  R4       MV P                  P                  R4       \        SV `)  WVRR7       . V n        \        P                  ! 4       V n        . V n        V P                  '       g   R# V P!                  R.R4      V n        VP                  R. 4      pV P#                  V4       VP                  R	. 4      pV P#                  VR
R7       \        P                  ! V P!                  R.R4      4      p\%        VP'                  V P(                  4      4      V n        \-        W P.                  V P*                  4      V n        \1        V P2                  R4      '       d   V P5                  V4       MV P7                  4        \9        W P.                  V P:                  4      V n        V P=                  V P:                  4      V n        V P?                  \A        W P.                  / 4      4      '       g
   R
V n        R# R# )r   nativezllvm-config-64zllvm-config-32r<   r=   Nz--componentsmodulesoptional_modulesF)requiredz
--cppflagsrV   z>= 3.9)!r   toolsr.   rC   r   r   HOST	is_64_bitappendrA   rB   provided_modules
OrderedSetrequired_modulesmodule_detailsrH   get_config_valuecheck_componentslist
difference(_LLVMDependencyConfigTool__cpp_blacklistrV   r   r#   r   version_set_new_link_args_set_old_link_argsr   rW   ._LLVMDependencyConfigTool__fix_bogus_link_argsrG   r   )rJ   r7   r!   r8   r   opt_modulescargsrL   s   &&&&   r(   rB   !LLVMDependencyConfigTool.__init__   s   (7
 

8X5K5K5P5P QR\\\JJ./JJ./ 	FUC-/:B:M:M:O-/}}} $ 5 5~6F	 R**Y+g&jj!3R8kE:##D$9$9<..$YZ !1!1$2F2F!GH4[BRBRTXTeTef4<<22##K0##%-k;K;KT^^\33DNNC''EUEUWY(Z[[!DM \r*   c                    V ^8  d   QhRRRR/# )r    argsT.List[str]r$   r&   )r'   s   "r(   r)   r      s      + + r*   c                   . pV F  pVP                  R4      '       d:   VP                  R4      '       d#   VP                  VP                  R4      4       KS  VP                  R4      '       dj   V P                  P
                  P                  V P                  ,          R,          pVP                  VP                  VP                  R4      4      4       K  VP                  V4       K  	  V# )a  This function attempts to fix bogus link arguments that llvm-config
generates.

Currently it works around the following:
    - FreeBSD: when statically linking -l/usr/lib/libexecinfo.so will
      be generated, strip the -l in cases like this.
    - Windows: We may get -LIBPATH:... which is later interpreted as
      "-L IBPATH:...", if we're using an msvc like compilers convert
      that to "/LIBPATH", otherwise to "-L ..."
-lr-   z	-LIBPATH:r<   )

startswithendswithr   lstripenvcoredata	compilersr#   extendget_linker_search_args)rJ   r   new_argsargr<   s   &&   r(   __fix_bogus_link_args.LLVMDependencyConfigTool.__fix_bogus_link_args   s     C~~d##U(;(;

4 01,,hh''11$2B2BCEJ : :3::k;R ST$  r*   c                    V ^8  d   QhRRRR/# )r    sharedrc   r$   r9   r&   )r'   s   "r(   r)   r      s     $ $t $ $r*   c                    V'       d   RMRpV P                   pRV n          V P                  RV.R4      V n        W0n         R#   Y0n         i ; i)z9Use llvm-config's --libfiles to check if libraries exist.--link-shared--link-staticTz
--libfilesr@   N)r   r   rW   )rJ   r   moderestores   &&  r(   __check_libfiles)LLVMDependencyConfigTool.__check_libfiles   sH    "(o --	$ "22L$3GLDN#MGMs   A A
c                    V ^8  d   QhRRRR/# )r    r!   r"   r$   r9   r&   )r'   s   "r(   r)   r     s     5 5m 5 5r*   c           
         V P                  R.R4      ^ ,          pT P
                  '       g   TR8X  d    T P                  R4       M+T P
                  '       d   TR8X  d    T P                  R4       T P
                  '       d   RR.MR.pT P                  RR
.T,           \-        T P.                  4      ,           R4      T n        R#   \         d"    \        P                  ! R4       RT n         R# i ; i  \         Ed    \        YP                  4      pT P                  R.R4      ^ ,          p\        \        P                  ! \        P                  P                  TR	T 24      4      4      pT'       g   T P                   '       d   h RT n         R# T P                  R
.R4      T n        \        P                  P%                  T^ ,          4      P'                  T4      P)                  R4      pT P"                  P+                  RT 24        R# i ; i  \         d    T P                   '       d   h RT n         R# i ; i)z/How to set linker args for LLVM versions >= 3.9z--shared-moderW   z+llvm-config --shared-mode returned an errorFNstaticT--libdirzlibLLVM*	--ldflagslibr   r   r   --system-libsr   --libs)r   
IndexErrorr   debugrH   r   )_LLVMDependencyConfigTool__check_libfilesr   r2   r#   sortedglobiglobrf   rg   rl   r   rW   basenamerstripr   r   r   r   )rJ   r!   r   lib_extlibdirmatcheslibnamerW   s   &&      r(   r   +LLVMDependencyConfigTool._set_new_link_args  s   	((/):KHKD {{{tx/%%d+  [[[TX-
%%e, ;?+++_o6OK\	..{#i/$t7L7L2MM_  	JJDE!DM	$ ' 3KAQAQR..
|[I!L BGGLL8G9AU,V!WX}}}$)DM!%!6!6}k!R''**71:6==gFMMeT%%7)n5, ' === %	sH   C C7 "H (C43C47BHHA:HHI5I Ic                   V ^8  d   QhRR/# rO   r&   )r'   s   "r(   r)   r   E  s     O OD Or*   c           	     4   V P                   '       d6   V P                  . R
O\        V P                  4      ,           R4      V n        R	# V P                  R.R4      ^ ,          pRV P
                   2p\        P                  ! V R24      p\        P                  ! V4       Fk  pVP                  V4      '       g   K  RV 2RP                  \        P                  P                  VP                  R4      4      ^ ,          4      .V n         R	# 	  \        R4      h)a  Setting linker args for older versions of llvm.

Old versions of LLVM bring an extra level of insanity with them.
llvm-config will provide the correct arguments for static linking, but
not for shared-linking, we have to figure those out ourselves, because
of course we do.
rW   r   zlibLLVM-z.(so|dll|dylib)$z-Lz-l{}r   z7Could not find a dynamically linkable library for LLVM.N)r   r   r   )r   r   r   r   rW   r   recompilerf   listdirmatchr'   rg   splitextr   r   )rJ   r   expected_namere_namefile_s   &    r(   r   +LLVMDependencyConfigTool._set_old_link_argsE  s     ;;;!2284@U@U;VVDN **J<EaHF&t||n5Mjj]O3C!DEGF+==''(*6(m&,mmBGG4D4DU\\RWEX4YZ[4\&]&_DN	 , *MO Or*   c               $    V ^8  d   QhRRRRRR/# )r    r   r   r   rc   r$   r9   r&   )r'   s   "r(   r)   r   d  s!     5 5 5t 5t 5r*   c                B   \        \        V4      4       F  pRpW0P                  9  d6   V'       d+   RV n        V P                  '       d   \        RV 24      hRpMRpMV P                  P                  V4       V P                  P                  W4,           4       K  	  R# )zCheck for llvm components (modules in meson terms).

The required option is whether the module is required, not whether LLVM
is required.
r@   Fz(Could not find required LLVM Component: z	(missing)z(missing but optional)N)
r   setr   rH   r   r   r   addr   r   )rJ   r   r   modstatuss   &&&  r(   r   )LLVMDependencyConfigTool.check_componentsd  s     #g,'CF///$)DM}}}1FseLN N(F5F%%))#.&&s|4 (r*   c                   V ^8  d   QhRR/# rq   r&   )r'   s   "r(   r)   r   {  s      S r*   c                	n    V P                   '       d#   R RP                  V P                   4      ,           # R# )z	modules: , r@   )r   rl   rv   s   &r(   log_details$LLVMDependencyConfigTool.log_details{  s+    4+>+>!???r*   )rV   rH   rW   r   r   r   r   r   )T)rz   r{   r|   r}   __doc__	tool_namer   rB   r   r   r   r   r   r	  r~   r   r   s   @r(   r   r      sF     I!lO' 'R.$ 5nO>5. r*   r   c                  j   a  ] tR tRtR V 3R lltR R ltR R ltR R	 ltR
 R ltR R lt	Rt
V ;t# )LLVMDependencyCMakei  c               (    V ^8  d   QhRRRRRRRR/# )	r    r7   r%   r   r"   r8   r   r$   r9   r&   )r'   s   "r(   r)    LLVMDependencyCMake.__annotate__  s0     @ @S @} @>Q @VZ @r*   c                	  < VP                  R . 4      V n        VP                  R. 4      V n        VP                  R\        P                  P
                  4      pVP                  P                  V,          pV'       d   RR0P                  V4      '       Eg%   \        P                  ! V \        R4      W#4       . V n        Wn        . pV'       g   RR.pM0RV9  d   VP                  R4       RV9  d   VP                  R4       \        P                   ! RR\#        V4      ^8X  d   RMR	R
RP%                  R V 4       4      P'                  RR4      RV P(                   R2RP+                  RP%                  R V 4       4      V P(                  \        P                  P,                  J d   RMR4      RRR7
       R# \.        SV `)  WVRRR7       V P0                  P3                  4       '       g   R# V P4                  '       g   R# V P6                  '       gG   \9        V P:                  R4      '       d+   V P                  '       d   \        P                   ! R4       R# V P<                  P?                  R4      pV P<                  P?                  R4      p\#        V4      ^8X  d   V^ ,          PA                  R 4      pV U	u. uF  p	R!V	,           NK  	  up	V,           p
T ;PB                  V
 U	u. uF  qV PB                  9  g   K  V	NK  	  up	,          un!        \E        W P(                  V PB                  4      V n!        V PG                  \I        W P(                  / 4      4      '       g
   RV n        R# R# u up	i u up	i )"r   r   r   cr<   cmakezDThe LLVM dependency was not found via CMake, as this method requiresz,both a C and C++ compiler to be enabled, butonlyneitheraz nor c              3  @   "   T F  qP                  4       x  K  	  R # 5iN)upper.0ls   & r(   	<genexpr>/LLVMDependencyCMake.__init__.<locals>.<genexpr>  s     61WWYYs   CPPzC++zcompiler is enabled for the.zVConsider adding "{0}" to your project() call or using add_languages({0}, native : {1})r  c              3  .   "   T F  pR V R 2x  K  	  R# 5i)'Nr&   r  s   & r(   r  r    s     61!Ahs   truefalsez"before the LLVM dependency lookup.FfatalNT)r>   force_use_global_compilersz< 7.0zcBefore version 7.0 cmake does not export modules for dynamic linking, cannot check required modulesPACKAGE_INCLUDE_DIRSPACKAGE_DEFINITIONS rS   )%rC   llvm_modulesllvm_opt_modulesr   r   r   r   r   issubsetr   rB   r   found_modulesr7   r   r   warninglenrl   replacer#   r'   BUILDrA   cmakebinr   rH   r   r   r   traceparserget_cmake_varsplitrV   r   rG   r   )rJ   r7   r   r8   r#   r   langsinc_dirsdefsxtemprL   s   &&&&       r(   rB   LLVMDependencyCMake.__init__  s   "JJy"5 &

+=r Bjj8+A+A+F+FGLL**;7	e 5 5i @ @''.@.I3W /1DI!#Eei'LL%	)LL'LLV>e*/y666>>ueL-##$A&hooII666"..(2H2H2N2NNFT[ 5 FUW[\}}""$$}}} {{{t||WEE$J[J[J[LL~ ##112HI--.CDt9>7==%D"*+(Qq(+d2LA$:K:K1KaaLL4S:J:JDL]L]^''=M=Mr(RSS!DM T ,Ls    M2,M7M7c                   V ^8  d   QhRR/# rq   r&   )r'   s   "r(   r)   r    s     $ $# $r*   c                	    R # )zCMakeListsLLVM.txtr&   rv   s   &r(   _main_cmake_file$LLVMDependencyCMake._main_cmake_file  s    #r*   c                   V ^8  d   QhRR/# r    r$   r   r&   )r'   s   "r(   r)   r    s     Y Y[ Yr*   c                	   R  R lpR R lp\        R4       Uu. uF%  p\        V! V4      R4      '       g   K  V! V4      NK'  	  ppV P                  '       dE   \        R4       Uu. uF/  p\        V! V4      V P                  4      '       g   K'  V! V4      NK1  	  pp\	        V\
        P                  ! V4      R7      # u upi u upi )c                    V ^8  d   QhRRRR/# )r    reqr%   r$   r&   )r'   s   "r(   r)   =LLVMDependencyCMake.llvm_cmake_versions.<locals>.__annotate__  s     	7 	7c 	7c 	7r*   c                D    \        V P                  R 4      R,           4      # )-z.0)r
   strip)rE  s   &r(   ver_from_suf=LLVMDependencyCMake.llvm_cmake_versions.<locals>.ver_from_suf  s    !#))C."566r*   c               $    V ^8  d   QhRRRRRR/# )r    r  r%   br$   intr&   )r'   s   "r(   r)   rF    s!     	 	c 	c 	c 	r*   c                r    \        V R V,           4      '       d   ^ # \        V RV,           4      '       d   ^# R# )=<)r   )r  rM  s   &&r(   version_sorter?LLVMDependencyCMake.llvm_cmake_versions.<locals>.version_sorter  s/    q#a%((q#a%((Ir*   r@   z>=0)key)r   r   version_reqsr	   r   	functools
cmp_to_key)rJ   rJ  rS  r:  llvm_requested_versionss   &    r(   llvm_cmake_versions'LLVMDependencyCMake.llvm_cmake_versions  s    	7	 =PPR<S"<SqWfgstugvx}W~?<?<S"@STV@W  'U@W1[op|}~p  BF  BS  BS  \T|A@W#  'U-93G3G3WXX	 #@ 'Us   B>B>&$CCc                   V ^8  d   QhRR/# rB  r&   )r'   s   "r(   r)   r    s     P P; Pr*   c           	     	   R P                  RP                  V P                  4      4      RP                  RP                  V P                  4      4      RP                  RP                  \	        V P
                  4      4      4      RP                  RP                  V P                  4       4      4      RP                  V P                  '       d   R4      .# R4      .# )z -DLLVM_MESON_REQUIRED_MODULES={};z -DLLVM_MESON_OPTIONAL_MODULES={}z-DLLVM_MESON_PACKAGE_NAMES={}z-DLLVM_MESON_VERSIONS={}z-DLLVM_MESON_DYLIB={}OFFON)r'   rl   r+  r,  r   r7   rZ  r   rv   s   &r(   _extra_cmake_opts%LLVMDependencyCMake._extra_cmake_opts  s    299#((4CTCT:UV299#((4CXCX:YZ/66sxx@STXT]T]@^7_`*11#((4;S;S;U2VW'..uN	P 	P JNN	P 	Pr*   c               $    V ^8  d   QhRRRRRR/# )r    r   zT.List[T.Tuple[str, bool]]
componentsr$   r&   )r'   s   "r(   r)   r    s(      (B Pj   pJ r*   c                	.   . pV F  w  rEV P                   P                  R V 24      pV'       gN   V'       d   V P                  RV R24      h\        P                  ! R\        P
                  ! V4      RRR7       Kx  V F  pW7V3.,          pK  	  K  	  V# )MESON_LLVM_TARGETS_zLLVM module z was not foundzOptional LLVM modulezwas not foundFr%  )r4  r5  _gen_exceptionr   r/  bold)rJ   r   rd  resr  r   
cm_targetsis   &&&     r(   _map_module_list$LLVMDependencyCMake._map_module_list  s    $MC))77:McU8STJ--SE.PQQLL!73`efH&   % 
r*   c                    V ^8  d   QhRRRR/# )r    moduler%   r$   r&   )r'   s   "r(   r)   r    s      C C r*   c                	d    V P                   P                  R V 24      pV'       d
   V^ ,          # V# )MESON_TARGET_TO_LLVM_)r4  r5  )rJ   ro  	orig_names   && r(   _original_module_name)LLVMDependencyCMake._original_module_name  s2    $$225J6(3ST	Q<r*   )rV   r.  rH   r+  r,  r7   )rz   r{   r|   r}   rB   r?  rZ  ra  rl  rs  r~   r   r   s   @r(   r  r    s0    @ @D$Y&P r*   r  c                  B   a  ] tR tRtRtR V 3R lltRR R lltRtV ;t# )	ValgrindDependencyi  zm
Consumers of Valgrind usually only need the compile args and do not want to
link to its (static) libraries.
c                    V ^8  d   QhRRRR/# )r    r   r"   r8   r   r&   )r'   s   "r(   r)   ValgrindDependency.__annotate__  s     2 2M 23F 2r*   c                	(   < \         SV `  R W4       R# )valgrindN)rA   rB   )rJ   r   r8   rL   s   &&&r(   rB   ValgrindDependency.__init__  s    S1r*   c               $    V ^8  d   QhRRRRRR/# )r    r>   T.Optional[str]rawrc   r$   r   r&   )r'   s   "r(   r)   rx     s"      o 4 T_ r*   c                	    . # r  r&   )rJ   r>   r~  s   &&&r(   get_link_args ValgrindDependency.get_link_args   s    	r*   r&   )NF)	rz   r{   r|   r}   r  rB   r  r~   r   r   s   @r(   rv  rv    s    2 2 r*   rv  rz  c                  .   a  ] tR tRtR V 3R lltRtV ;t# )ZlibSystemDependencyi  c               $    V ^8  d   QhRRRRRR/# r   r&   )r'   s   "r(   r)   !ZlibSystemDependency.__annotate__  s"     !$ !$S !$} !$FY !$r*   c                	F  < \         SV `  WV4       ^RIHp ^RIHp V P                  P                  V P                  ,          pVP                  4       '       d   \        V P                  WE34      '       gC   VP                  4       '       g-   VP                  4       '       g   VP                  4       '       d   RV n        R.V n        MV P                  P#                  4       R8X  d   RR.pMR.pV Fq  pV P                  P%                  V. V P&                  4      p	V P                  P)                  R	R
V .R7      p
V	'       g   KS  V
^ ,          '       g   Kd  RV n        Wn         M	  R# V P                  P+                  RR. V .4      w  rVP-                  R4      V n        R# )r    )AppleClangCCompiler)AppleClangCPPCompilerTz-lzmsvczlib1zlibzzzlib.hr@   )dependenciesNZLIB_VERSIONz#include <zlib.h>")rA   rB   compilers.cr  compilers.cppr  r   r.   r#   r0   
isinstancerT   
is_freebsdis_dragonflybsd
is_androidrH   rW   get_argument_syntaxrU   libtype
has_header
get_definerI  r   )rJ   r7   r!   r8   r  r  r1   libsr   r  hv_rL   s   &&&&         r(   rB   ZlibSystemDependency.__init__  sM   F359HHd../ [[]]z$*<*<?R>jkk!"3"3"5"5
 !DM#WDN!!5576A(u&&33CT\\J&&11(BdV1T11$(DM%&N  !!,,^=PRTW[V\]wws|r*   )rH   rW   r   r   r   s   @r(   r  r    s    !$ !$r*   r  c                  Z   a  ] tR tRtR V 3R llt]R R l4       t]R R l4       tRtV ;t	# )	JNISystemDependencyi,  c                    V ^8  d   QhRRRR/# r    r!   r"   r8   r   r&   )r'   s   "r(   r)    JNISystemDependency.__annotate__-  s     S SM S;N Sr*   c                	&  < \         SV `  R W4       RV n        V P                  P                  V P
                  ,          pRVP                  P                  V P
                  ,          9  d"   \        V P                  WP
                  R4       VP                  P                  V P
                  ,          R,          V n
        V P                  P                  V n        VP                  R. 4      pV FY  pVR9  g   K  RV R2pV P                  '       d   \        P                  ! V4       M\        P                   ! V4       RV n         R# 	  VP                  R	4      '       da   \%        V P                  VR	,          4      ^ ,          '       g7   \        P                  ! R
V P                   RVR	,           24       RV n        R# VP&                  V P
                  ,          P)                  4       V n        V P*                  '       Eg~   \,        P.                  ! \0        P2                  ! V P                  P5                  4       4      4      P7                  4       P8                  ^,          V n        VP;                  4       '       Ed   \,        P.                  ! R4      pWpP*                  P8                  9   d   \<        P>                  ! RRRVP@                  .\<        PB                  R7      pVPD                  ^ 8w  dK   RpV P                  '       d   \        P                  ! V4       M\        P                   ! V4       RV n        R# \,        P.                  ! VPF                  PI                  4       PK                  4       4      V n        V PM                  V4      p	V	f    \        P                  ! R4       RV n        R# V P*                  R,          p
V PN                  PQ                  RV
 24       V PN                  PQ                  RW,           24       V'       Edv   VPS                  4       '       d   V P*                  R,          pTpMs\U        V P                  R4      '       d<   V P*                  R,          R,          V PW                  VP@                  4      ,          pMV P*                  R,          pVR,          pRV9   de   V PX                  P[                  R\]        V4      .R7      pVf   \        P                   ! R4       RV n        MV P^                  Pa                  V4       RV9   de   V PX                  P[                  R\]        V4      .R7      pVf   \        P                   ! R4       RV n        MV P^                  Pa                  V4       RV n        R# ) jnijavar   jvmawtzUnknown JNI module ()FNr   zIncorrect JDK version found (z
), wanted z4/System/Library/Frameworks/JavaVM.framework/Versionsz/usr/libexec/java_homez
--failfastz--arch)stdoutzJJAVA_HOME could not be discovered on the system. Please set it explicitly.zlCould not find a JDK platform include directory for your OS, please open an issue or provide a pull request.r   rS   r   z<= 1.8.0jreserver)
extra_dirszjvm library not found.jawtzjawt library not found.T)0.62.0r@   >   r  r  )1rA   rB   feature_sincer   r.   r#   r   r   r   r7   javacr   rC   r   r   errorr   rH   r	   rD   get_java_home	java_homepathlibPathshutilwhichget_exeresolveparentsr0   
subprocessrun
cpu_familyPIPE
returncoder  decoderI  :_JNISystemDependency__machine_info_to_platform_include_dirrV   r   r/   r   #_JNISystemDependency__cpu_translaterT   rU   r%   rW   r   )rJ   r!   r8   r1   r   ro  msgproblem_java_prefixri  platform_include_dirjava_home_includejava_home_libjava_home_lib_serverr  r  rL   s   &&&            r(   rB   JNISystemDependency.__init__-  s   4+HHd../--778H8HIIDII{4D4DfM ))33D4D4DEfM
zz))**Y+F^+,VHA6===JJsOJJsO %  ::i  )=dllFS\L])^_`)a)aJJ6t||nJvV_O`Nabc!DM$//0@0@AOOQ~~~$\\&,,tzz7I7I7K*LMUUW__`abDN{{}}&-ll3i&j#&..*@*@@$..*BLRZ\]\h\h)i0:AC~~*j=== JJsO JJsO(-%,\\#**2C2C2E2K2K2M%NDN#JJ1M'JJ  F  G!DM NNY6  2&7%8!9:  2&7&N%O!PQ7||~~ $ 6'4$"4<<<<$(NNU$:U$BTEYEYZ[ZfZfEg$gM$(NNU$:M'4x'?$((55eMaIbHc5d;JJ78$)DMNN))#.))66v3}K]J^6_<JJ89$)DMNN))$/r*   c                    V ^8  d   QhRRRR/# )r    cpur%   r$   r&   )r'   s   "r(   r)   r    s     	' 	'S 	'S 	'r*   c                ,    RR/pVP                  W 4      # )z
The JDK and Meson have a disagreement here, so translate it over. In the event more
translation needs to be done, add to following dict.
x86_64amd64)rC   )r  	java_cpuss   & r(   __cpu_translate#JNISystemDependency.__cpu_translate  s!     g
	 }}S&&r*   c                    V ^8  d   QhRRRR/# )r    r1   z'MachineInfo'r$   r}  r&   )r'   s   "r(   r)   r    s      - O r*   c                   V P                  4       '       d   R# V P                  4       '       d   R# V P                  4       '       d   R# V P                  4       '       d   R# V P	                  4       '       d   R# V P                  4       '       d   R# V P                  4       '       d   R# V P                  4       '       d   R# R	# )
a!  Translates the machine information to the platform-dependent include directory

When inspecting a JDK release tarball or $JAVA_HOME, inside the `include/` directory is a
platform-dependent directory that must be on the target's include path in addition to the
parent `include/` directory.
linuxwin32darwinsolarisfreebsdnetbsdopenbsd	dragonflyN)is_linuxr/   r0   is_sunosr  	is_netbsd
is_openbsdr  )r1   s   &r(   &__machine_info_to_platform_include_dir:JNISystemDependency.__machine_info_to_platform_include_dir  s{     ::<<\\^^[[]]ZZ\\\\^^[[]]\\^^  r*   )r  rH   r  r  r   )
rz   r{   r|   r}   rB   staticmethodr  r  r~   r   r   s   @r(   r  r  ,  s8    S Sj 	' 	'  r*   r  r  c                  .   a  ] tR tRtR V 3R lltRtV ;t# )JDKSystemDependencyi  c                    V ^8  d   QhRRRR/# r  r&   )r'   s   "r(   r)    JDKSystemDependency.__annotate__  s      M ;N r*   c                	   < \         SV `  W4       RV n        V P                  P	                  \        RRR4      4       R# )0.59.0zjdk system dependencyr  z%Use the jni system dependency insteadN)r  r@   )rA   rB   r  featurechecksr   r   )rJ   r!   r8   rL   s   &&&r(   rB   JDKSystemDependency.__init__  s=    -+!!"3#3#
 	r*   )r  r   r   s   @r(   r  r    s     r*   r  jdkc                  |   a  ] tR tRtR R lt]R R l4       tR V 3R lltRR	R
R	RR	RR	RR	RR	RR	/R R lltRt	V ;t
# )DiaSDKSystemDependencyi  c               $    V ^8  d   QhRRRRRR/# )r    diadirr%   r  r$   rc   r&   )r'   s   "r(   r)   #DiaSDKSystemDependency.__annotate__  s!     + + +# +$ +r*   c                	B   \         P                  P                  V4      '       g   R # \         P                  P                  VR4      p\         P                  P                  V4      '       g   \        P
                  ! RV4       R # \         P                  P                  VRVR4      p\         P                  P                  V4      '       g   \        P
                  ! RV4       R # \         P                  P                  VRV4      p\         P                  P                  V4      '       g   \        P
                  ! RV R24       R # \        P                  ! \         P                  P                  VR	4      4      pV'       g    \        P
                  ! R
V,           4       R # \        V4      ^8  d    \        P
                  ! RV,           4       R # V^ ,          V n	        \         P                  P                  V P                  4      pV\        R4      \        R4      )  pVR,          R8X  d   VRR V n        M!\        P
                  ! RV R24       RV n        V P                  P                  RV,           4       V P                  P                  V4       RV n        R# )Fr   z%DIA SDK is missing include directory:r   zdiaguids.libzDIA SDK is missing library:binz
Directory z
 not foundz
msdia*.dllzCan't find msdia*.dll in z#Multiple msdia*.dll files found in msdiar,   0Nz&Unexpected DIA SDK version string in 'r"  unknownrS   TrR  )rf   rg   isdirrl   r   r  rh   r   r0  dllr   r   rV   r   rW   rH   )	rJ   r  r  r   r   bindirr   dllname
versionstrs	   &&&      r(   	_try_path DiaSDKSystemDependency._try_path  s   ww}}V$$'',,vy1ww}}W%%JJ>Hggll65#~>ww~~c""JJ4c:feS1ww~~f%%JJF8:67		"'',,v|<=JJ2V;<u:>JJ<vEF8 ''""488,S\3v;,7
b>S %cr?DLJJ?yJK$DL  0c"r*   c               (    V ^8  d   QhRRRRRRRR/# )	r    compilerz
'Compiler'dnamer%   r   r"   r$   rc   r&   )r'   s   "r(   r)   r    s(     " "j " "= "T "r*   c                	6    V P                  VR . . 4      w  r4VRJ# )r@   N)r  )r  r   r   defvalr  s   &&&  r(   _has_define"DiaSDKSystemDependency._has_define  s%    ''r2r:	T!!r*   c               $    V ^8  d   QhRRRRRR/# )r    r!   r"   r8   r   r$   r9   r&   )r'   s   "r(   r)   r    s#     ! !M !;N !SW !r*   c                	@  < \         SV `  R W4       RV n        VP                  P                  P
                  pRV9   d   VR,          pMRV9   d   VR,          pM\        R4      hVP                  R8H  ;'       d    V P                  VRV4      pVP                  R9  d   V'       g   \        R4      hRRR	R
RRRR/pVP                  P
                  P                  pVP                  V4      pVf   \        RV R24      h\        P                  P                  R4      p	V	f   \        R4      h\        P                  P                  V	R4      p
V P!                  W4      '       d!   \"        P$                  ! RV
4       RV n        R# \"        P$                  ! RV
4       R# )diasdkFr<   r  z/DIA SDK is only supported in C and C++ projectsclang_MSC_VERz@DIA SDK is only supported with Microsoft Visual Studio compilersarmaarch64arm64x86r   r  r  NzDIA SDK is not supported for "z" architectureVSInstallDirzAEnvironment variable VSInstallDir required for DIA SDK is not setzDIA SDKz#DIA SDK was found at default path: Tz'DIA SDK was not found at default path: >   r  clang-cl)rA   rB   rH   r   r   hostr   idr  r.   r  rC   rf   environrg   rl   r  r   r   )rJ   r!   r8   r   r  is_msvc_clangcpu_translater  r  vsdirr  rL   s   &&&        r(   rB   DiaSDKSystemDependency.__init__  sj   ;7((2277	I 'HI ~H%&WXX w.ff43C3CHjZe3f;;22=%&hiiy'5#xQXY ))..99

+;%(FzlR`&abb

~.=%&ijjeY/>>&&&JJ<fE DM

<fEr*   r  N	pkgconfig
configtoolinternalsystemdefault_valuepkgconfig_definec               8    V ^8  d   QhRRRRRRRRRRRRRR	R
R/# )r    r  r}  r  r  r  r  r  r  r   r$   r%   r&   )r'   s   "r(   r)   r    sZ     h h_ h h!0hCRh,hDSh (;h GJhr*   c               	v    VR 8X  d   V P                   '       d   V P                  # Ve   V# \        RV : 24      h)r  z9Could not get system variable and no default was set for )rH   r  r   )rJ   r  r  r  r  r  r  r  s   &$$$$$$$r(   get_variable#DiaSDKSystemDependency.get_variable  s=     U?t}}}88O$  !$]^b]e"fggr*   )r  rH   r   )rz   r{   r|   r}   r  r  r  rB   r  r~   r   r   s   @r(   r  r    su    +\ " "! !Fht hZ^ h37hUYh/3hVZh >Bh hr*   r  r  LLVM)cmake_classconfigtool_classllvmrQ   )pkgconfig_classsystem_classr   r  ZLIB)
cmake_namer&  )I
__future__r   r   rf   r   r  r  r  typingTrW  %mesonbuild.interpreterbase.decoratorsr   r@   r   r   
tooldetectr   r   r	   r
   baser   r   r   r   r   r   r   r   r  r   r  r   rI   r   factoryr   miscr   r  r   TYPE_CHECKING	envconfigr   r!   r   r   r   r   interpreter.type_checkingr   r   r2   r4   r   r   r   r   r  rv  r  r  r  r  CMAKECONFIG_TOOLllvm_factory	PKGCONFIGSYSTEMr   gmock_factoryzlib_factoryr&   r*   r(   <module>r;     s!   #  	 	      C  , L L t  t  t " ,  & ! *???')$(?)	5#, 5#p4+ 48#, 8#v4+ 4H3 HTu/ up	, 	 * #$+ #$L{* {z &	- 	 &`h- `hD , "3
/;;<#-	#  < %6  "3":":;%&	%  M %6  "3":":;%&	%  M #4
  "3"9"9;L;S;ST%	#  <r*   