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

Krzysztof Karas <[email protected]>
Newsgroups org.freedesktop.lists.igt-dev
Message-ID <6qlytk3gz5eiloadmw6ufqmfmtgfvl4xkxc47kweqf5ggu5cyy@7iwhkkjfazkh>
Hi,

On 2026-07-15 at 14:15:39 +0200, Sebastian Brzezinka wrote:
> intel_gvtg_test only needs the core assert/log/skip helpers provided by
> igt_core plus the lightweight tool stubs. Replace the monolithic include
> with the minimal header set and stop linking against libigt.so.
> 
> ldd before: 35  (ldd | wc -l)
> ldd after:   3  (ldd | wc -l)
> 
> Signed-off-by: Sebastian Brzezinka <[email protected]>
> Acked-by: Ashutosh Dixit <[email protected]>
> Reviewed-by: Krzysztof Niemiec <[email protected]>
> ---
>  tools/intel_gvtg_test.c | 2 +-
>  tools/meson.build       | 6 +++++-
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/intel_gvtg_test.c b/tools/intel_gvtg_test.c
> index 408e703bf..fe8f7a599 100644
> --- a/tools/intel_gvtg_test.c
> +++ b/tools/intel_gvtg_test.c
> @@ -30,7 +30,7 @@
>   */
>  #include "config.h"
>  
> -#include "igt.h"
> +#include "igt_core.h"
>  #include <errno.h>
>  #include <getopt.h>
>  #include <math.h>
> diff --git a/tools/meson.build b/tools/meson.build
> index 2a084a0c4..6e694164f 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -26,7 +26,6 @@ tools_progs = [
>  	'intel_residency',
>  	'intel_tiling_detect',
>  	'intel_gem_info',
> -	'intel_gvtg_test',
>  	'dpcd_reg',
>  	'lsgpu',
>  ]
> @@ -132,6 +131,11 @@ executable('intel_display_poller', 'intel_display_poller.c',
>  	   install_rpath : bindir_rpathdir,
>  	   install : true)
>  
> +executable('intel_gvtg_test', 'intel_gvtg_test.c',
> +	   dependencies : [lib_igt_tools_stub, pciaccess, libdrm, math],
> +	   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.