[Mesa-dev] [PATCH] RFC: meson: Add a new build-dev-tools option
Rob Clark
robdclark at gmail.com
Sat Nov 11 18:30:29 UTC 2017
On Sat, Nov 11, 2017 at 12:42 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> 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.
fwiw, nouveau and etnaviv also have standalone compilers
And I kinda think mesa already has too many build config options
already, so maybe tying these to debug build would be a reasonable way
to avoid adding another.. I don't insist on it if someone else has a
reason to build their driver's "dev tools" outside of a debug build,
but I really only have use for ir3compiler in the context of a debug
build.
BR,
-R
> Cc: Rob Clark <robdclark at gmail.com>
> Cc: Dylan Baker <dylan at 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.')
> +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
> + subdir('tools')
> +endif
> if with_intel_vk
> subdir('vulkan')
> endif
> diff --git a/src/intel/tools/meson.build b/src/intel/tools/meson.build
> index 1996d52..b64a005 100644
> --- a/src/intel/tools/meson.build
> +++ b/src/intel/tools/meson.build
> @@ -25,7 +25,8 @@ aubinator = executable(
> include_directories : [inc_common, inc_intel],
> link_with : [libintel_common, libintel_compiler, libmesa_util],
> c_args : [c_vis_args, no_override_init_args],
> - build_by_default : false,
> + build_by_default : true,
> + install : true,
> )
>
> aubinator_error_decode = executable(
> @@ -35,5 +36,6 @@ aubinator_error_decode = executable(
> include_directories : [inc_common, inc_intel],
> link_with : [libintel_common, libintel_compiler, libmesa_util],
> c_args : [c_vis_args, no_override_init_args],
> - build_by_default : false,
> + build_by_default : true,
> + install : true,
> )
> --
> 2.5.0.400.gff86faf
>
More information about the mesa-dev
mailing list