Re: [PATCH i-g-t v3 15/31] tools/intel_gtt: link with minimal sub-libraries

Krzysztof Karas <[email protected]>
Newsgroups org.freedesktop.lists.igt-dev
Message-ID <y5h4yfs6zvc6lw5gljgf54m6rvbipw36fnnsff4337pqgkldvp@age6qsiijk5l>
Hi Sebastian,

On 2026-07-15 at 14:15:25 +0200, Sebastian Brzezinka wrote:
> intel_gtt only needs the chipset helpers plus the small tool stubs they
> rely on. The full libigt.so dependency chain is unnecessary.
> 
> Switch to linking against lib_igt_chipset, lib_igt_tools_stub,
> lib_igt_drm_stub, pciaccess and libdrm.
> 
> ldd before: 35  (ldd | wc -l)
> ldd after:   5  (ldd | wc -l)
> 
> Signed-off-by: Sebastian Brzezinka <[email protected]>
> Acked-by: Ashutosh Dixit <[email protected]>
> Reviewed-by: Krzysztof Niemiec <[email protected]>
> ---
>  tools/meson.build | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/meson.build b/tools/meson.build
> index 8eb346321..a3fef87a9 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -25,7 +25,6 @@ tools_progs = [
>  	'intel_forcewaked',
>  	'intel_framebuffer_dump',
>  	'intel_gpu_time',
> -	'intel_gtt',
>  	'intel_guc_logger',
>  	'intel_hdcp',
>  	'intel_infoframes',
> @@ -75,6 +74,12 @@ executable('intel_stepping', 'intel_stepping.c',
>  	   install_rpath : bindir_rpathdir,
>  	   install : true)
>  
> +executable('intel_gtt', 'intel_gtt.c',
> +	   dependencies : [lib_igt_chipset, lib_igt_tools_stub, lib_igt_drm_stub,
> +	                    pciaccess, libdrm],
> +	   install_rpath : bindir_rpathdir,
> +	   install : true)
> +
>  if libudev.found()
>  	intel_dp_compliance_src = [
>  		'intel_dp_compliance.c',
> -- 
> 2.53.0
> 

Reviewed-by: Krzysztof Karas <[email protected]>

-- 
Best Regards,
Krzysztof
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.