+
    UBi"                    *   ^ RI Ht ^ RIt^ RIt^ RIt^RIHt ^RIHt ^RIH	t	 ^RIH
t
HtHtHtHt ^RIHt R"R R	 lltR#R
 R lltR$R R lltR R ltR%R R lltR R ltR&R R lltR&R 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# )'    )annotationsN)coredata)mesonlib)mlog)MachineChoice
Popen_safesearch_version	quote_arg
split_args)ExternalProgramc               (    V ^8  d   QhRRRRRRRR/# )   	gcovr_exestrmin_versionlogboolreturn/T.Union[T.Tuple[None, None], T.Tuple[str, str]] )formats   ":/usr/lib/python3.14/site-packages/mesonbuild/tooldetect.py__annotate__r      s)      C  $ :    c           
         \        V R .4      R,          w  r4\        T4      pTP                  ^ 8X  ds   \
        P                  ! TRT,           4      '       dO   T'       dD   \        P                  ! RP                  T\        \        P                  ! T 4      4      4      4       Y3# R#   \        \        3 d    Ru # i ; i)	--versionr   r   N>=zFound gcovr-{} at {}NN)r   FileNotFoundErrorPermissionErrorr	   
returncoder   version_comparer   r   r   r
   shutilwhich)r   r   r   pfounds   &&&  r   detect_gcovrr(      s    y+67< 5!E||qX55eTK=OPPHH+225)FLLQZD[:\]^ / s   B( (B>=B>c               $    V ^8  d   QhRRRRRR/# )r   lcov_exer   r   r   r   r   r   )r   s   "r   r   r       s"      # T :r   c           
     J    \        V R .4      R,          w  r#\        T4      pTP                  ^ 8X  dW   T'       dO   T'       dD   \
        P                  ! RP                  T\        \        P                  ! T 4      4      4      4       Y3# R#   \        \        3 d    Ru # i ; i)r   r   zFound lcov-{} at {}r   )r   r    r!   r	   r"   r   r   r   r
   r$   r%   )r*   r   r&   r'   s   &&  r   detect_lcovr,       s    x56s; 5!E||qUHH*11%6<<PXCY9Z[\ / s   B B"!B"c                    V ^8  d   QhRRRR/# )r   suffixT.Optional[str]r   r   )r   s   "r   r   r   .   s      O  r   c                    V e-   V R8X  d   RpMRV  2p\         P                  ! V4      e   V#  R # \        R4      pV F#  p\         P                  ! V4      '       g   K!  Vu # 	  R # )N zllvm-covz	llvm-cov-)r$   r%   get_llvm_tool_names)r.   tooltoolss   &  r   detect_llvm_covr5   .   sm    R<Dvh'D<<)K * 	 $J/D||D!!  r   c                    V ^8  d   QhRRRR/# )r   r   coredata.CoreDatar   r/   r   )r   s   "r   r   r   ?   s      "3  r   c                   V P                   \        P                  ,          pR V9   ;'       d    VR ,          P                  R8H  pRV9   ;'       d    VR,          P                  R8H  pV'       d,   VR ,          P                  P                  R4      ^ ,          pV# V'       d,   VR,          P                  P                  R4      ^ ,          pV# R# )cppclangc.N)	compilersr   BUILDidversionsplit)r   r=   cpp_compiler_is_clangc_compiler_is_clangr.   s   &    r   compute_llvm_suffixrD   ?   s    ""=#6#67I!Y.QQ9U3C3F3F'3Q*KKy~/@/@G/K5!))//4Q7 3''--c215 r   c               $    V ^8  d   QhRRRRRR/# )r   r*   r   genhtml_exer   z"T.Tuple[str, T.Optional[str], str]r   )r   s   "r   r   r   Q   s"     / /# /S /-/r   c                X    \        V 4      w  r\        P                  ! V4      f   R pWV3# N)r,   r$   r%   )r*   rF   lcov_versions   && r   detect_lcov_genhtmlrJ   Q   s.    (2H||K (;..r   c                    V ^8  d   QhRRRR/# )r   r   r7   r   zmT.Tuple[T.Optional[str], T.Optional[str], T.Optional[str], T.Optional[str], T.Optional[str], T.Optional[str]]r   )r   s   "r   r   r   Y   s#     
W 
W"3 
W  9f 
Wr   c                    \        4       w  r\        \        V 4      4      pVf   \        R4      p\        4       w  rEpWWEWc3# )Nr1   )r(   r5   rD   rJ   )r   r   gcovr_versionllvm_cov_exer*   rI   rF   s   &      r   find_coverage_toolsrO   Y   sF    +~I"#6x#@AL&r**=*?'HKX[VVr   c               $    V ^8  d   QhRRRRRR/# )r   r@   r   r   r   r   zT.Optional[T.List[str]]r   )r   s   "r   r   r   e   s"      # d ?V r   c                >    \        W4      pV'       d
   V^ ,          # R# )r   N) detect_ninja_command_and_version)r@   r   rs   && r   detect_ninjarT   e   s    (6A1Q4$r   c               $    V ^8  d   QhRRRRRR/# )r   r@   r   r   r   r   z%T.Optional[T.Tuple[T.List[str], str]]r   )r   s   "r   r   r   i   s"      c $ Sx r   c                ~   \         P                  P                  R R4      pV'       d   V.M. RO EFj  p\        VRR7      pVP	                  4       '       g   K)   \        VP                  R.,           4      R,          w  rVTP                  4       pTP                  ^ 8X  g   Ks  \        P                  ! TR	T ,           4      '       g   K  T'       d   \         P                  P                  T4      pTP                  R
T,           4      '       d   T^ R\!        T4      ,
           pTR8X  d   RpTR8X  d   Rp\"        P$                  ! RP'                  YvRP)                  TP                   Uu. uF  p\+        T4      NK  	  up4      4      4       TP                  T3u # 	  R#   \        \        3 d     EK  i ; iu upi )NINJANninjaninja-buildsamuT)silentr   r   r   -samuraizFound {}-{} at {} )rX   rY   rZ   )osenvirongetr   r'   r   commandr    r!   stripr"   r   r#   pathbasenameendswithlenr   r   r   joinr
   )	r@   r   	env_ninjanprogr&   r'   namexs	   &&       r   rR   rR   i   sa   

w-I%i[+KKq.zz||	!$,,+">?DHA  <<1!9!9%!P!Pww''*==u--"s5z/2D=("D6>$D,33D"FA9Q<"FGI JLL%((/ L0 % "?3 		  #Gs   &F!*F:!F76F7c                    V ^8  d   QhRRRR/# )r   r3   r   r   T.List[str]r   )r   s   "r   r   r      s     ) )c )k )r   c                2   . R NRNRNRNRNRNRNRNRNR	NR
NRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR-NR.NR/NR0NR1NR2NR3NR4NR5NR6NRNR7Np. pV F  pVP                  W,           4       K  	  V# )8r1   z-21.1z21.1z-2121z-20.1z20.1z-2020z-19.1z19.1z-1919z-18.1z18.1z-1818z-1717z-1616z-1515z-1414z-1313z-1212z-1111z-1010z-990z-880z-770z-6.060z-5.050z-4.040z-3.939z-3.838z-3.737z-3.636z-3.535z-devel)append)r3   suffixesnamesr.   s   &   r   r2   r2      sb   
 	  		 	
 	
  	  	  	  	  	  	  	  	  	  	   	!  !" 	#" #$ 	%$ %& 	'& '( 	)( )* 	+* +, 	-, -. 	/. /0 	10 12 	32 34 	54 56 	76 78 	98 9: 	;< 	=H@ ET]# Lr   c                   V ^8  d   QhRR/# r   r   rp   r   )r   s   "r   r   r      s      + r   c                    . p R\         P                  9   d"   \        \         P                  R,          4      p M3\        R4      pV F"  p\        P
                  ! V4      pVf   K  V.p  M	  V '       d]   V ^ ,          p\         P                  P                  V4      '       d/   \         P                  ! V\         P                  4      '       d   V.# . # )a  Look for scan-build binary on build platform

First, if a SCANBUILD env variable has been provided, give it precedence
on all platforms.

For most platforms, scan-build is found is the PATH contains a binary
named "scan-build". However, some distribution's package manager (FreeBSD)
don't. For those, loop through a list of candidates to see if one is
available.

Return: a single-element list of the found scan-build binary ready to be
    passed to Popen()
	SCANBUILDz
scan-build)
r`   ra   r   r2   r$   r%   re   isfileaccessX_OK)exelistr4   r3   r%   s       r   detect_scanbuildr      s     Gbjj RZZ45 $L1DLL&E  '	  qz77>>$BIIdBGG$<$<6MIr   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r      s      K r   c                 l    \        R4      p V  F"  p\        P                  ! V4      pVf   K  V.u # 	  . # )a
  Look for clang-format binary on build platform

Do the same thing as detect_scanbuild to find clang-format except it
currently does not check the environment variable.

Return: a single-element list of the found clang-format binary ready to be
    passed to Popen()
zclang-formatr2   r$   r%   r4   r3   re   s      r   detect_clangformatr      s:      /E||D!6M  Ir   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r      s      + r   c                 l    \        R4      p V  F"  p\        P                  ! V4      pVf   K  V.u # 	  . # )zLook for clang-tidy binary on build platform

Return: a single-element list of the found clang-tidy binary ready to be
    passed to Popen()
z
clang-tidyr   r   s      r   detect_clangtidyr      s:      -E||D!6M  Ir   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r      s      ; r   c                 l    \        R4      p V  F"  p\        P                  ! V4      pVf   K  V.u # 	  . # )zLook for clang-apply-replacements binary on build platform

Return: a single-element list of the found clang-apply-replacements binary
    ready to be passed to Popen()
zclang-apply-replacementsr   r   s      r   detect_clangapplyr      s;       :;E||D!6M  Ir   )gcovrz3.3F)lcovFrH   )r   genhtml)z1.8.2F)
__future__r   r`   r$   typingTr1   r   r   r   r   r   r	   r
   r   programsr   r(   r,   r5   rD   rJ   rO   rT   rR   r2   r   r   r   r   r   r   r   <module>r      si   
 # 	      V V %"$/
W8)V@ r   