[Mesa-dev] [PATCH v3] intel/tools: new intel_sanitize_gpu tool

Dylan Baker dylan at pnwbakers.com
Thu Apr 5 20:21:15 UTC 2018


Quoting Scott D Phillips (2018-02-08 17:11:25)
> diff --git a/src/intel/tools/intel_sanitize_gpu.in b/src/intel/tools/intel_sanitize_gpu.in
> new file mode 100755
> index 00000000000..3dac954c408
> --- /dev/null
> +++ b/src/intel/tools/intel_sanitize_gpu.in
> @@ -0,0 +1,4 @@
> +#!/bin/bash
> +# -*- mode: sh -*-
> +
> +LD_PRELOAD="@install_libexecdir@/libintel_sanitize_gpu.so${LD_PRELOAD:+:$LD_PRELOAD}" exec "$@"
> diff --git a/src/intel/tools/meson.build b/src/intel/tools/meson.build
> index 82413041b13..752d826bcb9 100644
> --- a/src/intel/tools/meson.build
> +++ b/src/intel/tools/meson.build
> @@ -41,3 +41,28 @@ aubinator_error_decode = executable(
>    build_by_default : with_tools.contains('intel'),
>    install : with_tools.contains('intel'),
>  )
> +
> +if with_tools.contains('intel')

Most of the other tools are build_by_default, but I don't see a good way to use
configure_file with install in that way. So I guess this is fine.

> +  sanitize_data = configuration_data()
> +  sanitize_data.set(
> +    'install_libexecdir',
> +    join_paths(get_option('prefix'), get_option('libexecdir'))
> +  )
> +  configure_file(
> +    input: 'intel_sanitize_gpu.in',
> +    output: 'intel_sanitize_gpu',

You can use '@BASENAME@' here I think.

> +    install_dir: get_option('bindir'),
> +    configuration: sanitize_data,
> +  )
> +
> +  libintel_sanitize_gpu = shared_module(
> +    'intel_sanitize_gpu',
> +    files('intel_sanitize_gpu.c'),
> +    dependencies : [dep_dl, cc.find_library('pthread')],

[dep_dl, dep_thread], right?

> +    include_directories : [inc_common, inc_intel, inc_drm_uapi],
> +    link_with : [libintel_common, libmesa_util],
> +    c_args : [c_vis_args, no_override_init_args],
> +    install_dir: get_option('libexecdir'),
> +    install: true,
> +  )
> +endif
> -- 
> 2.14.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180405/52124a46/attachment.sig>


More information about the mesa-dev mailing list