intel/meson: Make intel_stub_gpu work with `meson devenv`
The tool intel_stub_gpu
is a script that is generated from a template intel_stub_gpu.in
. That template contains
ld_preload="@install_libdir@/libintel_noop_drm_shim.so${LD_PRELOAD:+:$LD_PRELOAD}"
if [ -n "$gdb" ]; then
gdb -iex "set exec-wrapper env LD_PRELOAD=$ld_preload INTEL_STUB_GPU_PLATFORM=$platform" --args "$@"
elif [ -n "$valgrind" ]; then
LD_PRELOAD=$ld_preload INTEL_STUB_GPU_PLATFORM=$platform exec valgrind "$@"
else
LD_PRELOAD=$ld_preload INTEL_STUB_GPU_PLATFORM=$platform exec "$@"
fi
Note the first line making a reference to @install_libdir@
, as a consequence the ld_preload won't point to the correct libintel_noop_drm_shim.so
file when using meson devenv
. And if that file is not installed, will fail to find any file.