<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Nov 11, 2017 at 10:30 AM, Rob Clark <span dir="ltr"><<a href="mailto:robdclark@gmail.com" target="_blank">robdclark@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sat, Nov 11, 2017 at 12:42 PM, Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> wrote:<br>
> A variety of the different drivers in mesa have some sort of developer<br>
> tools to go along with them.  Normal users don't want these but devs do.<br>
> This commit adds a new build-dev-tools option which causes these tools<br>
> to be built and installed.<br>
<br>
</span>fwiw, nouveau and etnaviv also have standalone compilers<br>
<br>
And I kinda think mesa already has too many build config options<br>
already,</blockquote><div><br></div><div>Yeah...  that may be. I've stopped noticing as I just have a build script that does it all for me (and, incidentally works with both autotools and meson).<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> so maybe tying these to debug build would be a reasonable way<br>
to avoid adding another.. I don't insist on it if someone else has a<br>
reason to build their driver's "dev tools" outside of a debug build,<br>
but I really only have use for ir3compiler in the context of a debug<br>
build.<br></blockquote><div><br></div><div>Maybe...  However, the aubinator tools that we have are something you may want to at least use with a release build.  Whether or not there's any point in building them in release mode, I don't know.  Sometimes it is useful to use the aubinator out of the same branc as you're hacking on.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
BR,<br>
-R<br>
<div class="HOEnZb"><div class="h5"><br>
> Cc: Rob Clark <<a href="mailto:robdclark@gmail.com">robdclark@gmail.com</a>><br>
> Cc: Dylan Baker <<a href="mailto:dylan@pnwbakers.com">dylan@pnwbakers.com</a>><br>
> ---<br>
>  meson.build                               | 5 +++++<br>
>  meson_options.txt                         | 6 ++++++<br>
>  src/gallium/drivers/freedreno/<wbr>meson.build | 3 ++-<br>
>  src/intel/meson.build                     | 4 +++-<br>
>  src/intel/tools/meson.build               | 6 ++++--<br>
>  5 files changed, 20 insertions(+), 4 deletions(-)<br>
><br>
> diff --git a/meson.build b/meson.build<br>
> index 1f6658b..98b72e9 100644<br>
> --- a/meson.build<br>
> +++ b/meson.build<br>
> @@ -411,6 +411,11 @@ elif with_amd_vk<br>
>    error('Radv requires shader cache support')<br>
>  endif<br>
><br>
> +build_dev_tools = get_option('build-dev-tools')<br>
> +if build_dev_tools and get_option('buildtype') == 'release'<br>
> +  warning('The build-dev-tools option is for developers only.  Distros and regular users should leave it off.')<br>
> +endif<br>
> +<br>
>  # Check for GCC style builtins<br>
>  foreach b : ['bswap32', 'bswap64', 'clz', 'clzll', 'ctz', 'expect', 'ffs',<br>
>               'ffsll', 'popcount', 'popcountll', 'unreachable']<br>
> diff --git a/meson_options.txt b/meson_options.txt<br>
> index 6c9cd33..8e2716a 100644<br>
> --- a/meson_options.txt<br>
> +++ b/meson_options.txt<br>
> @@ -182,3 +182,9 @@ option(<br>
>    choices : ['8', '16', '32'],<br>
>    description : 'Number of channel bits for OSMesa.'<br>
>  )<br>
> +option(<br>
> +  'build-dev-tools',<br>
> +  type : 'boolean',<br>
> +  value : false,<br>
> +  description: 'Build and install developer tools.  This option is recommended for developers only and should not be set by users or packagers.'<br>
> +)<br>
> diff --git a/src/gallium/drivers/<wbr>freedreno/meson.build b/src/gallium/drivers/<wbr>freedreno/meson.build<br>
> index 3fb94ed..cffb9cd 100644<br>
> --- a/src/gallium/drivers/<wbr>freedreno/meson.build<br>
> +++ b/src/gallium/drivers/<wbr>freedreno/meson.build<br>
> @@ -224,5 +224,6 @@ ir3_compiler = executable(<br>
>      libglsl_standalone,<br>
>      libmesa_util,<br>
>    ],<br>
> -  build_by_default : true,<br>
> +  install : build_dev_tools,<br>
> +  build_by_default : build_dev_tools,<br>
>  )<br>
> diff --git a/src/intel/meson.build b/src/intel/meson.build<br>
> index 5767608..777afbf 100644<br>
> --- a/src/intel/meson.build<br>
> +++ b/src/intel/meson.build<br>
> @@ -25,7 +25,9 @@ subdir('genxml')<br>
>  subdir('common')<br>
>  subdir('isl')<br>
>  subdir('compiler')<br>
> -subdir('tools')<br>
> +if (with_dri_i965 or intel_vk) and build_dev_tools<br>
> +  subdir('tools')<br>
> +endif<br>
>  if with_intel_vk<br>
>    subdir('vulkan')<br>
>  endif<br>
> diff --git a/src/intel/tools/meson.build b/src/intel/tools/meson.build<br>
> index 1996d52..b64a005 100644<br>
> --- a/src/intel/tools/meson.build<br>
> +++ b/src/intel/tools/meson.build<br>
> @@ -25,7 +25,8 @@ aubinator = executable(<br>
>    include_directories : [inc_common, inc_intel],<br>
>    link_with : [libintel_common, libintel_compiler, libmesa_util],<br>
>    c_args : [c_vis_args, no_override_init_args],<br>
> -  build_by_default : false,<br>
> +  build_by_default : true,<br>
> +  install : true,<br>
>  )<br>
><br>
>  aubinator_error_decode = executable(<br>
> @@ -35,5 +36,6 @@ aubinator_error_decode = executable(<br>
>    include_directories : [inc_common, inc_intel],<br>
>    link_with : [libintel_common, libintel_compiler, libmesa_util],<br>
>    c_args : [c_vis_args, no_override_init_args],<br>
> -  build_by_default : false,<br>
> +  build_by_default : true,<br>
> +  install : true,<br>
>  )<br>
> --<br>
> 2.5.0.400.gff86faf<br>
><br>
</div></div></blockquote></div><br></div></div>