+
    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	H
t
 ^RIHt ^RIHt ^RIHtHtHt ^RIHt ^ RIt]P.                  ! R4      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 R ltR# )    )annotationsN)Path)mlog)lang_suffixes)	quiet_git	join_argsdetermine_worker_count)complete_allInfoc               $    V ^8  d   QhRRRRRR/# )   cmdlistT.List[str]envzT.Optional[T.Dict[str, str]]returnint )formats   "@/usr/lib/python3.14/site-packages/mesonbuild/scripts/run_tool.py__annotate__r      s#      K >Z fi     c                  "   \        V 4      pRp \        P                  ! V RVR\        P                  P                  R\        P                  P
                  R\        P                  P                  / G Rj  xL
 pVP                  4       G Rj  xL
 w  rET'       dL   \        \        P                  ! R4      TR	R
7       \        P(                  P*                  P-                  T4       TP&                  #  L} Lg  \         dv   p\        \        P                  ! R4      T\        P                  R7       \        \        P                  ! R4      TP                  \        P                  R7        Rp?^# Rp?i\        P                    dN    T'       dB   TP#                  4        TP%                  4       G Rj  xL 
  TP&                  ;'       g    ^u #  ^ # i ; i5i)zRun the command in cmdlist, buffering the output so that it is
not mixed for multiple child processes.  Kill the child on
cancellation.Nr   stdinstdoutstderrz>>>)filez
not found:T)flush)r   asynciocreate_subprocess_exec
subprocessDEVNULLPIPESTDOUTcommunicateFileNotFoundErrorprintr   bluesysr   redfilenameCancelledErrorkillwait
returncoder   bufferwrite)r   r   quoted_cmdlinepstdo_es   &&     r   run_with_buffered_outputr6      s[     w'N04A00' Ss S7>7I7I7Q7QS8?8J8J8O8OS 9@8J8J8Q8QS S ' diid;

%<<)S ( diiSZZ@dhh|$ajjszzB!! FFH&&(NN<<$$1$s   GA'C: 8C69C: C8C: GAG6C: 8C: :GA*E5/G5GG#G8F;9GGGGGc               $    V ^8  d   QhRRRRRR/# )r   infoszT.Iterable[Info]fnz<T.Callable[[Info], T.Iterable[T.Coroutine[None, None, int]]]r   r   r   )r   s   "r   r   r   3   s)     "N "N. "NW"N\_"Nr   c                R  aaa"   . o\         P                  ! \        4       4      oR  V3R lloR V3R llp\        P                  R8w  dV   \         P
                  ! 4       pVP                  \        P                  V4       VP                  \        P                  V4       V  F$  pSP                  V3R lV! V4       4       4       K&  	  S'       g   ^ #  \        S4      G Rj  xL
  \        R S 4       4      #  L  \         d    S F  pTP                  4        K  	  h i ; i5i)c                    V ^8  d   QhRRRR/# )r   worker_corozT.Coroutine[None, None, int]r   r   r   )r   s   "r   r   "_run_workers.<locals>.__annotate__8   s     % %#? %C %r   c                .  <"    S;_uu_4       GR j  xL
  V G R j  xL
 uuR R R 4      GR j  xL
  #  L  L L	  + GR j  xL 
 '       g   i     R # ; i  \         P                   d'   pT P                  T4       T G R j  xL 
 u R p?# R p?ii ; i5iN)r   r+   throw)r<   r5   	semaphores   & r   run_one_run_workers.<locals>.run_one8   s^     	% yy(( !yy( !yyy%% 	%a $$$$	%s   BA 4A :6:A 8A BA :A A	 A
A	A	A BA B,BBBBBBBc                   V ^8  d   QhRR/# )r   r   Noner   )r   s   "r   r   r=   @   s      T r   c                 :   < S F  p V P                  4        K  	  R # r?   )cancel)ffuturess    r   sigterm_handler%_run_workers.<locals>.sigterm_handler@   s    AHHJ r   win32c              3  \   <"   T F!  p\         P                  ! S! V4      4      x  K#  	  R # 5ir?   )r   ensure_future).0xrB   s   & r   	<genexpr>_run_workers.<locals>.<genexpr>J   s#     I5a--gaj995s   ),Nc              3     "   T FD  qP                  4       '       g   K  VP                  4       '       d   K2  VP                  4       x  KF  	  R # 5ir?   )done	cancelledresult)rO   rH   s   & r   rQ   rR   U   s*     M7affhzq{{}zqxxzz7s   AAA)r   	Semaphorer	   r(   platformget_running_loopadd_signal_handlersignalSIGINTSIGTERMextendr
   BaseExceptionrG   max)	r8   r9   rJ   loopirH   rI   rB   rA   s	   &&    @@@r   _run_workersrc   3   s     +-G!!"8":;I% %  ||w'')?@I2a5IJ 7### M7MMM 	$ AHHJ s6   CD'D'C> %C<&C> *D'<C> >&D$$D'c                    V ^8  d   QhRRRR/# )r   fnamer   r   r   r   )r   s   "r   r   r   W   s     
 
d 
{ 
r   c                8   . p V P                  R R7      ;_uu_ 4       pV FG  pVP                  4       pV'       g   K  VP                  R4      '       d   K6  VP                  V4       KI  	  RRR4       V#   + '       g   i     T# ; i  \         d     T# i ; i)utf-8encoding#N)openstrip
startswithappendr%   )re   patternsrH   linepatterns   &    r   parse_pattern_filerr   W   s    HZZZ))Q**,77#5#5c#:#:OOG,  * O *) O  Os9   B
 A6A6A6,B
 6B	B
 B
 
BBc               (    V ^8  d   QhRRRRRRRR/# )r   namestrsrcdirr   builddirr   zT.Iterable[Path]r   )r   s   "r   r   r   c   s)      # t t @P r   c           	   #    a"   \        VR V  R2,          4      pV'       d!   V Uu. uF  qAP                  V4      NK  	  ppMT\        R.V4      w  rgV'       d,   VP                  4        Uu. uF  p\	        W4      NK  	  up.pMVP                  R4      .p\        VR V  R2,          4      p\        VR,          4      .p	T	P                  V Uu. uF  p\        W,          4      NK  	  up4       \        \        R,          4      P                  \        \        R,          4      4      p
V
P                  R4       V
 Uu0 uF  pR V 2kK
  	  p
p\        P                  P                  V4       F{  p\        V4      oVP                  4       '       gR   VP                  V
9  gA   \         ;QJ d    V3R	 lV	 4       F  '       g   K   R
M	  RM! V3R	 lV	 4       4      '       d   Kw  Vx  K}  	  R# u upi u upi u upi u upi 5i).z-includezls-filesz**/*z-ignore*ccpphc              3  R   <"   T F  p\         P                   ! SV4      x  K  	  R # 5ir?   )fnmatch)rO   rb   strfs   & r   rQ   "all_clike_files.<locals>.<genexpr>w   s     =fGOOD!,,fs   $'TFN)rr   globr   
splitlinesr   ru   r^   setr   unionadd	itertoolschainfrom_iterableis_dirsuffixany)rt   rv   rw   ro   r2   globsrorH   ignoresuffixessr   s   &&&         @r   all_clike_filesr   c   s    !&QtfH+="=>H)12AQ2*v./0||~>~!d6o~>?E[[()E!&QtfG+<"<=H(S.!"F
MMH5Hq3vz?H56=%&,,Su1E-FGHLL!)*A!A3H*__**511v88::1=f==f=== 2 3 ?
 6 +sH   #HG-,H+G2?AHG7(AH=G<A H,HH! Hc               0    V ^8  d   QhRRRRRRRRRR	R
R/# r   rt   ru   rv   r   rw   r9   z-T.Callable[..., T.Coroutine[None, None, int]]argszT.Anyr   r   r   )r   s   "r   r   r   {   sE     W W Wd Wd W@m Wv{ W  AD Wr   c           	       aa \         P                  R 8X  d?   \         P                  R8  d*   \        P                  ! \        P
                  ! 4       4       R VV3R llp\        P                  ! \        \        WV4      V4      4      # )rL   c                    V ^8  d   QhRRRR/# r   pathr   r   z(T.Iterable[T.Coroutine[None, None, int]]r   )r   s   "r   r   $run_clang_tool.<locals>.__annotate__         d G r   c              3  (   <"   S! V .SO5!  x  R # 5ir?   r   r   r   r9   s   &r   wrapperrun_clang_tool.<locals>.wrapper        oo         )	r(   rX   version_infor   set_event_loop_policyWindowsProactorEventLoopPolicyrunrc   r   )rt   rv   rw   r9   r   r   s   &&&fj r   run_clang_toolr   {   sZ    
||w3#3#3f#<%%g&L&L&NO ;;|OD($KWUVVr   c               0    V ^8  d   QhRRRRRRRRRR	R
R/# r   r   )r   s   "r   r   r      sA     < <C < < <Kx <  BG <  LO <r   c           
       aa \         P                  R 8X  d?   \         P                  R	8  d*   \        P                  ! \        P
                  ! 4       4       \        4       p\        RRR7      ;_uu_ 4       p\        P                  ! V4      pV Fa  pVP                  R4      ;'       g    .  F?  p	V	P                  R4      ;'       g    .  F  p
VP                  \        V
4      4       K  	  KA  	  Kc  	  RRR4       \        \        WV4      4      pVP                  V4      pR VV3R llp\        P                  ! \!        W\4      4      #   + '       g   i     L_; i)
rL   meson-info/intro-targets.jsonrg   rh   target_sourcessourcesNc                    V ^8  d   QhRRRR/# r   r   )r   s   "r   r   /run_clang_tool_on_sources.<locals>.__annotate__   r   r   c              3  (   <"   S! V .SO5!  x  R # 5ir?   r   r   s   &r   r   *run_clang_tool_on_sources.<locals>.wrapper   r   r   r   )r(   rX   r   r   r   r   r   rk   jsonloadgetr   r   r   intersectionr   rc   )rt   rv   rw   r9   r   source_filesfptargetstargettarget_sourcesourceclike_filesr   s   &&&fj        r   run_clang_tool_on_sourcesr      s   
||w3#3#3f#<%%g&L&L&NO5L	-	@	@B))B-F!',<!=!C!C!C+//	:@@b@F $$T&\2 A "D  
A odH=>K,,[9L ;;|L:;; 
A	@s   53E
)E
,E

E	c                    V ^8  d   QhRRRR/# )r   r9   zJT.Callable[[T.Dict[str, T.Any]], T.Iterable[T.Coroutine[None, None, int]]]r   r   r   )r   s   "r   r   r      s     2 2 Q 2UX2r   c                v   \         P                  R 8X  d?   \         P                  R8  d*   \        P                  ! \        P
                  ! 4       4       \        RRR7      ;_uu_ 4       p\        P                  ! V4      pRRR4       \        P                  ! \        XV 4      4      #   + '       g   i     L0; i)rL   r   rg   rh   Nr   )r(   rX   r   r   r   r   rk   r   r   r   rc   )r9   r   r   s   &  r   run_tool_on_targetsr      su    
||w3#3#3f#<%%g&L&L&NO	-	@	@B))B- 
A;;|GR011 
A	@s   )B((B8	r?   ) 
__future__r   asyncio.subprocessr   r   r   r   r[   r(   pathlibr    r   	compilersr   mesonlibr   r   r	   mtestr
   typingTTypeVarr   r6   rc   rr   r   r   r   r   r   r   r   <module>r      se    #      
   % C C   yy:"NH
0W<(2r   