o
    nc                     @  sd   d dl mZ ddlmZ ddlmZmZ d dlZ	d dl
Z
d dlZdd Zdd	 Zd
d Zdd ZdS )    )annotations   )coredata)MachineChoice	OptionKeyNc                 C  s*   | j dddddd | j ddd	d
d d S )Nz--all
store_trueallFz&Show data not used by current backend.)actiondestdefaulthelpbuilddir?.zThe build directory)nargsr   r   )add_argument)parser r   shome/ych/rk3568/buildroot/output/rockchip_rk3568/host/lib/python3.10/site-packages/mesonbuild/munstable_coredata.pyadd_arguments   s   r   c                 C  sp   |   D ]1\}}td| d  td|j  tdd|j  |jr+td|j  |jr5td|j  qd S )N  :z
      Id: z      Command:  z      Full version: z      Detected version: )itemsprintidjoinZexelistZfull_versionversion)	compilerslangcompilerr   r   r   dump_compilers   s   r!   c                 C  s*   |   D ]\}}td| d |  qd S )Nr   : )r   r   )dnamevaluer   r   r   
dump_guids*   s   r&   c                 C  sx  d}| j d urtj| j |}tj|std dS | j}td td td t| j }|	t
d}t|j D ]\}}|dv rGq>|d	v r[|sR|d
rZt|d |  q>|dkrq|sf|d
rpt|d  t| q>|dkr|s|d
s|dkrt|d  t| q>|dkr|s|d
rtdd|  q>|dkrtd|  q>|dkrtd|  q>|dkr|rtdd|  q>|dkr|rtdd|  q>|dkrtD ]}td|  t||  qq>|dkr(dd }ttD ]*}t||  }	|	r&td |  d! |	D ]\}
}|D ]}||
| qqqq>t|d  ttt|d" q>d S )#Nzmeson-privatez^Current directory is not a build dir. Please specify it or change the working directory to it.r   zSThis is a dump of the internal unstable cache of meson. This is for debugging only.zKDo NOT parse, this will change from version to version in incompatible ways backend>   Zbase_optionsuser_optionsZcompiler_optionsbuiltinsZbackend_options>   Zinstall_guidZ	test_guidZ
regen_guidvsr"   Ztarget_guidsr   Z
lang_guidsZxcodeZmeson_commandz/Meson command used in build file regeneration: r   Zpkgconf_envvarz0Last seen PKGCONFIG environment variable value: r   zMeson version: Zcross_fileszCross File: Zconfig_fileszNative File: r   zCached {} machine compilers:depsc                 S  st   t d| d d  d  t dt|   t dt|   | r.t dt|   t dt|   d S )	Nr   r   r   r"   z      compile args: z      link args: z      sources: z      version: )r   reprZget_compile_argsZget_link_argsZget_sourcesget_version)dep_keydepr   r   r   	print_depb   s   zrun.<locals>.print_depzCached dependencies for z machiner   )r   ospathr   isdirr   r   cdataloadZ
get_optionr   sorted__dict__r   
startswithr&   r   formatZget_lower_case_namer!   itertextwrapindentpprintpformat)optionsZdatadirZall_backendsr   r(   kvZfor_machiner1   Z
items_listr/   r,   r0   r   r   r   run/   s   

rC   )
__future__r   r'   r   r5   Zmesonlibr   r   os.pathr2   r>   r<   r   r!   r&   rC   r   r   r   r   <module>   s   