[PATCH RESEND i-g-t v4 08/31] tools/intel_gpu_top: add explicit drm/tools-stub deps

Sebastian Brzezinka <[email protected]> Wed, 29 Jul 2026 13:03:25 +0200
Newsgroups org.freedesktop.lists.igt-dev
Message-ID <d8226763005a985e163317e185b8187dddba58e8.1785152675.git.sebastian.brzezinka@intel.com>
Meson does not automatically propagate static library dependencies
to executables via link_with.  lib_igt_device_scan internally links
lib_igt_drm_stub and lib_igt_tools_stub but does not reexport them
through its declare_dependency.  As a result intel_gpu_top must list
them explicitly, otherwise the linker cannot resolve symbols such as
is_i915_device and igt_log at final link time.

Signed-off-by: Sebastian Brzezinka <[email protected]>
Acked-by: Ashutosh Dixit <[email protected]>
Reviewed-by: Krzysztof Niemiec <[email protected]>
Reviewed-by: Krzysztof Karas <[email protected]>
---
 tools/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/meson.build b/tools/meson.build
index 4c67dde4f..53aa31056 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -105,7 +105,8 @@ install_subdir('registers', install_dir : datadir)
 executable('intel_gpu_top', 'intel_gpu_top.c',
 	   install : true,
 	   install_rpath : bindir_rpathdir,
-	   dependencies : [lib_igt_perf,lib_igt_device_scan,lib_igt_drm_clients,lib_igt_drm_fdinfo,math])
+	   dependencies : [lib_igt_perf,lib_igt_device_scan,lib_igt_drm_clients,lib_igt_drm_fdinfo,
+	                   lib_igt_drm_stub, lib_igt_tools_stub, math])
 
 executable('amd_hdmi_compliance', 'amd_hdmi_compliance.c',
 	   dependencies : [tool_deps],
-- 
2.53.0