Skip to content

meson: add support for `meson devenv`

Dylan Baker requested to merge dbaker/mesa:submit/add-meson-devenv into main

Meson devenv is a feature added in meson 0.58 (thus the features is version guarded) that allows creating a shell environment with environment variables automatically setup for running the project inside the build dir. Some variables (such as LD_LIBRARY_PATH and PATH) are set automatically, others must be added by the project.

For mesa, that is mainly about setting up the proper VK_ICD_FILENAMES and LIBGL_DRIVERS_PATH variables (the rest is handled for us). In both cases we need a little extra code as well, since we need icd files pointing to the uninstalled vulkan drivers; and for libgl we need to create the per vendor links in the build directory. Neither of these are hard.

With this change a developer doesn't need to install vulkan or (dri) OpenGL drivers, and can instead use meson devenv -C $builddir, then just run their workloads.

I have not looked at OpenCL, or non-dri drivers.

Edited by Dylan Baker

Merge request reports

Loading