+
    UBiz7                    x   ^ 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 ^RIHt ^RIHtHtHtHtHt ^ R	IHt ^ R
IHt ]P6                  '       d   ^ RItR R ltR R ltR R lt ! R R4      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 R  lt'R! R" lt(R# )#    )annotationsN)defaultdict)Path)mlog)mesonlib)	OptionKey)MesonExceptionRealPathAction	join_argslistify_array_valuesetup_vsenv)detect_ninja)buildc                    V ^8  d   QhRRRR/# )   valuestrreturnT.List[str] )formats   "8/usr/lib/python3.14/site-packages/mesonbuild/mcompile.py__annotate__r      s     & &S &[ &    c                    \        V 4      # )N)r   )r   s   &r   	array_argr      s    u%%r   c                    V ^8  d   QhRRRR/# )r   builddirr   r   Noner   )r   s   "r   r   r      s     R R R Rr   c                l    V R ,          R,          P                  4       '       g   \        RV  R24      hR# )zmeson-privatezcoredata.datz3Current directory is not a meson build directory: `z`.
Please specify a valid build dir or change the working directory to it.
It is also possible that the build directory was generated with an old
meson version. Please regenerate it in this case.N)is_filer	   )r   s   &r   validate_builddirr"      sF    &7@@BBRS[R\ ]Q Q R 	R Cr   c                    V ^8  d   QhRRRR/# )r   r   r   r   zT.Dict[str, T.List[dict]]r   )r   s   "r   r   r   %   s      D -F r   c                   V R,          R,          pVP                  4       '       g   \        RVP                   R24      hVP                  RR7      ;_uu_ 4       p\        P
                  ! V4      pRRR4       \        \        4      pX F  pWER,          ;;,          V.,          uu&   K!  	  V#   + '       g   i     LF; i)	zY
Converts a List of name-to-dict to a dict of name-to-dicts (since names are not unique)
z
meson-infozintro-targets.json`z.` is missing! Directory is not configured yet?zutf-8)encodingNname)existsr	   r'   openjsonloadr   list)r   path_to_introfschemaparsed_datatargets   &     r   parse_introspect_datar2   %   s     |+.BBM!!q!3!3 44bcdd			W		-	-1 
. .9->K6N#x/#  
.	-s   B//B?	c                  P    ] tR t^4tRtRtRtRtRtRt	R R lt
]R R l4       tRtR# )ParsedTargetName c                   V ^8  d   QhRR/# )r   r1   r   r   )r   s   "r   r   ParsedTargetName.__annotate__<   s     & &s &r   c                	D   Wn         VP                  R ^4      p\        V4      ^8  dL   V^,          V n        V P	                  V P                  4      '       g   \        RV RV P                   R24      hV^ ,          P                  R^4      p\        V4      ^8  d   V^ ,          V n        V^,          V n        MV^ ,          V n        V P                  P                  R^4      p\        V4      ^8  d   V^ ,          V n        V^,          V n	        R# V^ ,          V n        R# ):Can't invoke target `z`: unknown target type: `r%   /.N)
	full_namersplitlentype_is_valid_typer	   pathr'   	base_namesuffix)selfr1   splits   && r   __init__ParsedTargetName.__init__<   s    c1%u:>aDI&&tyy11$'=fXE^_c_h_h^iij%kllaQ'u:>aDIaDIaDI		  a(u:>"1XDN(DK"1XDNr   c                    V ^8  d   QhRRRR/# )r   r@   r   r   boolr   )r   s   "r   r   r7   S   s     % %S %T %r   c                	    0 RmpW9   # )
executable>   jarrunaliascustomrL   shared_moduleshared_librarystatic_libraryr   )r@   allowed_typess   & r   rA   ParsedTargetName._is_valid_typeR   s    	
 $$r   )rC   r=   r'   rB   rD   r@   N)__name__
__module____qualname____firstlineno__r=   rC   r'   r@   rB   rD   rG   staticmethodrA   __static_attributes__r   r   r   r4   r4   4   s9    IIDDDF&, % %r   r4   c               (    V ^8  d   QhRRRRRRRR/# )r   r1   r4   r   r   introspect_datazT.Dict[str, T.Any]r   r   )r   s   "r   r   r   a   s/     4 4'7 44 4Zl 4  rD 4r   c                n   V P                   V9  d+   V P                  V9  d   \        R V P                   R24      hW P                   ,          pV'       g   W P                  ,          p. pVP	                  4       pV P
                  '       g)   V P                  '       g   V P                  '       g   TpEM:V EF3  pVR,          pVR,          P                  R^4      p\        V4      ^8  d=   V^ ,          P                  R^4      p\        V4      ^8  d   V^,          pM	V^ ,          pV P
                  '       d)   V P
                  VR,          P                  RR4      8w  g|   V P                   V8w  gk   V P                  '       d\   VR	,          R
8w  dN   \        V P                  4      \        VR	,          ^ ,          4      P                  V4      P                  8w  d   EK*  WF.,          pEK6  	  V'       g   \        R V P                   R24      h\        V4      ^8  Ed   . p	V F  p
V
R,          pV
R,          P                  R^4      p\        V4      ^8  d=   V^ ,          P                  R^4      p\        V4      ^8  d   V^,          pM	V^ ,          p\        V
R	,          ^ ,          4      P                  V4      P                  V,          pV
R,          P                  RR4      pV	P                  RV RV 24       K  	  RP!                  V	4      p\        R V P                   RV 24      hV^ ,          # )r:   z`: target not foundr'   id@z@@r@    _filenameno_namez- ./r9   
z0`: ambiguous name. Add target type and/or path:
)r'   rC   r	   r=   resolver@   rB   rD   r>   r?   rF   replacer   relative_toparentappendjoin)r1   r   r]   intro_targetsfound_targetsresolved_bdirintro_targetintro_target_namerF   suggestionsii_nameptsuggestions_strs   &&&            r   get_target_from_intro_datarw   a   s   {{/)f.>.>o.U5f6F6F5GGZ[\\#KK0M'(8(8902M$$&M;;;v{{{6===%)L ,V 4 &--c15E5zA~atQ/u:>(-a%(-a%V0D0L0LSRU0V!V 11j!9Y!Ffkk"d<
+CA+F&G&S&STa&b&i&ii^+M *" 5f6F6F5GGZ[\\	]	a	#%AvYFdGNN3*E5zA~atQ/u:>"1XF"1XFQz]1%&22=AHH6QA&	!!#s+AaS!~.  ))K05f6F6F5G H??N>OQ R 	R r   c               (    V ^8  d   QhRRRRRRRR/# )	r   r1   r4   r   r   r]   dictr   r   r   )r   s   "r   r   r      s1     n n(8 nD n[_ ndo nr   c           	         \        WV4      pVR ,          R9   d   V P                  .# VR,           Uu. uF4  p\        \        V4      P	                  VP                  4       4      4      NK6  	  up# u upi )r@   rc   >   rN   rO   )rw   r'   r   r   rh   rf   )r1   r   r]   ro   out_files   &&&  r   generate_target_names_ninjar|      se    -fPLF//}T`akTlmTlDN..x/?/?/ABCTlmmms   :A0c               $    V ^8  d   QhRRRRRR/# r   options'argparse.Namespace'r   r   r   z2T.Tuple[T.List[str], T.Optional[T.Dict[str, str]]]r   )r   s   "r   r   r      s#      #7 4 L~ r   c                   \        4       pVf   \        R4      hTpVP                  R4      '       g"   VP                  RVP	                  4       .4       V P
                  ^ 8  d'   VP                  R\        V P
                  4      .4       V P                  ^ 8  d'   VP                  R\        V P                  4      .4       V P                  '       d   VP                  R4       W0P                  ,          pV P                  '       dC   \        V4      pV P                   F'  pVP                  \        \        V4      W4      4       K)  	  V P                  '       d   VP                  R4       VR 3# )NzCannot find ninja.r<   -C-j-l-vclean)r   r	   samefileextendas_posixjobsr   load_averageverboserj   
ninja_argstargetsr2   r|   r4   r   )r   r   runnercmd
intro_dataru   s   &&    r   get_parsed_args_ninjar      s   ^F~122
CS!!

D(++-./ ||a

D#gll+,-a

D#g22345

4C *84
AJJ23CA3F]^ !}}}

79r   c               (    V ^8  d   QhRRRRRRRR/# )	r   r1   r4   r   r   r]   ry   r   r   r   )r   s   "r   r   r      s+      $4  W[ `c r   c                H   \        WV4      pVR ,          R9  g   Q R4       h\        P                  ! RRVR,          4      p\        VR,          ^ ,          4      P	                  VP                  4       4      P                  pV\        R4      8w  d   \        WT,          4      pV# )r@   z9Should not reach here: `run` targets must be handle abovez[\%\$\@\;\.\(\)']rb   r_   rc   r<   >   rN   rO   )rw   resubr   rh   rf   ri   r   )r1   r   r]   ro   target_namerel_paths   &&&   r   generate_target_name_vsr      s    -fPL'77t9tt7 &&-sL4FGKL,Q/0<<X=M=M=OPWWH49(01r   c               $    V ^8  d   QhRRRRRR/# r~   r   )r   s   "r   r   r      s#     5 5 4 5 5I{ 5r   c                  aa \        SP                  R 4      4      p\        V4      ^8X  g   Q R4       hV^ ,          pR.pV P                  '       Ed   \	        S4      o\
        ;QJ d*    VV3R lV P                   4       F  '       g   K   RM	  RM! VV3R lV P                   4       4      pV'       d   \        V P                  4      ^8  d   \        R4      h\        \        V P                  ^ ,          4      SS4      p\        VR,          ^ ,          4      P                  pVRP                  VR	,          4      ,          pV\        VP                  4       4      .,          pMV\        VP                  4       4      .,          pTP                  V P                   U	u. uF(  p	R
P                  \        \        V	4      SS4      4      NK*  	  up	4       M!V\        VP                  4       4      .,          pV P                   '       d   VP                  R.4       V P"                  ^ 8  d    VP%                  RV P"                   24       MVP%                  R4       V P&                  '       d   \(        P*                  ! R4       V P,                  '       g   VP%                  R4       W@P.                  ,          p\0        P2                  P5                  4       p
V
P7                  RR4       WJ3# u up	i )z*.slnz$More than one solution in a project?msbuildc              3  d   <"   T F%  p\        \        V4      SS4      R ,          R9   x  K'  	  R# 5i)r@   N>   rN   rO   )rw   r4   ).0ru   r   r   s   & r   	<genexpr>%get_parsed_args_vs.<locals>.<genexpr>   s3      &$ ''7':HjQRXY]mm$s   -0TFzPOnly one target may be specified when `run` target type is used on this backend.rc   z
{}.vcxprojr_   z
-target:{}z-target:Cleanz-maxCpuCount:z-maxCpuCountz6Msbuild does not have a load-average switch, ignoring.z-verbosity:minimalPLATFORMN)r,   globr?   r   r2   anyr	   rw   r4   r   ri   r   r   rf   r   r   r   r   rj   r   r   warningr   vs_argsosenvironcopypop)r   r   slnsslnr   has_run_targetro   proj_dirprojru   envr   s   &f         @r   get_parsed_args_vsr      sT   g&'Dt9>AAA>
q'C+C*84
 &__& &__& &  7??#a'$%wxx56FwWXGY6Z\dfpqLL4Q78??HL//T0BCCDC'((CC&''CJJ  zA  zI  zI  J  zItu++,CDTUVDWYacm,no  zI  J  KCKKM"##}}}

O$% ||a

]7<<.12

>"MN???

'(??C **//
CGGJ8O5 Js    .K,c               $    V ^8  d   QhRRRRRR/# r~   r   )r   s   "r   r   r     s#     " "#7 "4 "L~ "r   c                   R p\         P                  ! V4      '       g   \        R4      h\        P                  ! \        V4      4       VR.pV P                  '       d   V P                   F  pVRV.,          pK  	  V P                  '       d3   V P                  '       d   VR.,          pMVRR.,          pVR.,          pV P                  ^ 8  d'   VP                  R\        V P                  4      .4       V P                  ^ 8  d   \        P                  ! R4       V P                  '       d    W0P                  ,          pVR	3# )

xcodebuildz.Cannot find xcodebuild, did you install XCode?z-parallelizeTargetsz-targetr   z-alltargetsz-UseNewBuildSystem=FALSEz-jobsz8xcodebuild does not have a load-average switch, ignoringN)shutilwhichr	   r   chdirr   r   r   r   r   r   r   r   r   
xcode_args)r   r   r   r   ru   s   &&   r   get_parsed_args_xcoder     s   F<<MNN HHS](
)CAIq>!C ! }}}???G9CM7++C*++||a

GS./0aOP 	C9r   c                    V ^8  d   QhRRRR/# )r   parserz'argparse.ArgumentParser'r   r   r   )r   s   "r   r   r   (  s     4 43 4 4r   c           	        V P                  RRRRRR7       V P                  RRR	R
7       V P                  RR\        RR7       V P                  RRR^ \        RR7       V P                  RRR^ \        RR7       V P                  RRRRR
7       V P                  R\        . RR7       V P                  R\        . RR7       V P                  R\        . R R7       R# )!zAdd compile specific arguments.r   TARGET*NzlTargets to build. Target has the following format: [PATH_TO_TARGET/]TARGET_NAME.TARGET_SUFFIX[:TARGET_TYPE].)metavarnargsdefaulthelpz--clean
store_truezClean the build directory.)actionr   r   wdz#directory to cd into before running)destr   r   r   z--jobsstorezjThe number of worker jobs to run (if supported). If the value is less than 1 the build program will guess.)r   r   r@   r   r   z--load-averagez:The system load average to try to maintain (if supported).r   z	--verbosezShow more verbose output.z--ninja-argsz?Arguments to pass to `ninja` (applied only on `ninja` backend).)r@   r   r   z	--vs-argsz>Arguments to pass to `msbuild` (applied only on `vs` backend).z--xcode-argszDArguments to pass to `xcodebuild` (applied only on `xcode` backend).)add_argumentr
   intfloatr   )r   s   &r   add_argumentsr   (  s2   
{  } )  
 4B  D hy   I   k(  
 N	   M	   S	  r   c                    V ^8  d   QhRRRR/# )r   r   r   r   r   r   )r   s   "r   r   r   ^  s      % # r   c                   \        V P                  4      p\        V4       V P                  '       d   V P                  '       d   \        R 4      h\        P                  ! V P                  4      pVP                  P                  p\        P                  ! RVP                  P                  \        R4      4      4      p\        V4      '       d,   \         P"                  ! \         P$                  ! R4      R4       . pRpVP                  P                  \        R4      4      p\'        V\(        4      '       g   Q h\         P"                  ! \         P$                  ! R4      RV4       VR8X  d   \+        W4      w  rVMIVP-                  R	4      '       d   \/        W4      w  rVM$VR
8X  d   \1        W4      w  rVM\        RV R24      h\         P"                  ! \         P$                  ! R4      R\3        V4      4       \4        P6                  ! V\8        P:                  P<                  \8        P>                  P<                  VR7      vrVP@                  # )z3`TARGET` and `--clean` can't be used simultaneouslyrJ   vsenvzINFO:z1automatically activated MSVC compiler environmentNbackendzautodetecting backend asninjavsxcodez	Backend `zR` is not yet supported by `compile`. Use generated project files directly instead.z#calculating backend command to run:)stdoutstderrr   )!r   r   r"   r   r   r	   r   r+   environmentcoredataTcastoptstoreget_value_forr   r   r   loggreen
isinstancer   r   
startswithr   r   r   r   
Popen_safesysr   bufferr   
returncode)
r   bdirbcdata
need_vsenvr   r   r   rt   rb   s
   &         r   rN   rN   ^  s   

Dd7===STT

7::AMM""E < <Yw=O PQJ:G$&YZC(,Cnn**9Y+?@Ggs####HHTZZ "<gF'(7S			D	!	!%g4S	G	(7Sy rsu 	u 	HHTZZ "GSVXCJJ,=,=cjjFWFW]`aEA<<r   ))
__future__r   r   r*   r   r   r   typingr   collectionsr   pathlibr   r5   r   r   r   r   r	   r
   r   r   r   mesonbuild.tooldetectr   
mesonbuildr   TYPE_CHECKINGargparser   r"   r2   r4   rw   r|   r   r   r   r   r   rN   r   r   r   <module>r      s    # 5 	  	 
   #     a a . ???&R+% +%Z4ln>5n"L4lr   