Quoting Jason Ekstrand (2017-11-11 09:42:34) > A variety of the different drivers in mesa have some sort of developer > tools to go along with them. Normal users don't want these but devs do. > This commit adds a new build-dev-tools option which causes these tools > to be built and installed. > > Cc: Rob Clark <robdcl...@gmail.com> > Cc: Dylan Baker <dy...@pnwbakers.com> > --- > meson.build | 5 +++++ > meson_options.txt | 6 ++++++ > src/gallium/drivers/freedreno/meson.build | 3 ++- > src/intel/meson.build | 4 +++- > src/intel/tools/meson.build | 6 ++++-- > 5 files changed, 20 insertions(+), 4 deletions(-) > > diff --git a/meson.build b/meson.build > index 1f6658b..98b72e9 100644 > --- a/meson.build > +++ b/meson.build > @@ -411,6 +411,11 @@ elif with_amd_vk > error('Radv requires shader cache support') > endif > > +build_dev_tools = get_option('build-dev-tools') > +if build_dev_tools and get_option('buildtype') == 'release' > + warning('The build-dev-tools option is for developers only. Distros and > regular users should leave it off.')
`warning` is brand new in 0.43 (or 0.44? I can't remember). Either way you should use `message` so that this works with 0.42 > +endif > + > # Check for GCC style builtins > foreach b : ['bswap32', 'bswap64', 'clz', 'clzll', 'ctz', 'expect', 'ffs', > 'ffsll', 'popcount', 'popcountll', 'unreachable'] > diff --git a/meson_options.txt b/meson_options.txt > index 6c9cd33..8e2716a 100644 > --- a/meson_options.txt > +++ b/meson_options.txt > @@ -182,3 +182,9 @@ option( > choices : ['8', '16', '32'], > description : 'Number of channel bits for OSMesa.' > ) > +option( > + 'build-dev-tools', > + type : 'boolean', > + value : false, > + description: 'Build and install developer tools. This option is > recommended for developers only and should not be set by users or packagers.' > +) > diff --git a/src/gallium/drivers/freedreno/meson.build > b/src/gallium/drivers/freedreno/meson.build > index 3fb94ed..cffb9cd 100644 > --- a/src/gallium/drivers/freedreno/meson.build > +++ b/src/gallium/drivers/freedreno/meson.build > @@ -224,5 +224,6 @@ ir3_compiler = executable( > libglsl_standalone, > libmesa_util, > ], > - build_by_default : true, > + install : build_dev_tools, > + build_by_default : build_dev_tools, > ) > diff --git a/src/intel/meson.build b/src/intel/meson.build > index 5767608..777afbf 100644 > --- a/src/intel/meson.build > +++ b/src/intel/meson.build > @@ -25,7 +25,9 @@ subdir('genxml') > subdir('common') > subdir('isl') > subdir('compiler') > -subdir('tools') > +if (with_dri_i965 or intel_vk) and build_dev_tools ^^^^^^^^ with_intel_vk > + subdir('tools') > +endif Using `and build_dev_tools` means that a develper can't use `ninja path/to/tool`, I don't know if thats the end of the world, but that does make the ir3 compiler and the intel tools behave differently. I'd prefer to to do: ```meson intel_tools = (with_dri_i965 or with_intel_vk) and build_dev_tools executable( ... build_by_default : intel_tools, install: intel_tools, ) ``` Nouveau also has a standalone compiler
signature.asc
Description: signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev