Re: [Mesa-dev] [PATCH] meson: Add build option for tools
Oh, freedreno also has a standalone compiler, os we should probably add a fredreeno option as well. Dylan Quoting Scott D Phillips (2018-02-07 16:55:24) > Add a build option to control building some of the misc tools we > have. Also set the executables to install, presumably you want > that if you're asking for the build. > --- > meson.build | 5 + > meson_options.txt | 6 ++ > src/compiler/glsl/meson.build | 6 -- > src/compiler/meson.build| 3 ++- > src/gallium/drivers/nouveau/meson.build | 3 ++- > src/intel/tools/meson.build | 6 -- > 6 files changed, 23 insertions(+), 6 deletions(-) > > diff --git a/meson.build b/meson.build > index b61c285bf00..6ff0c9ad96a 100644 > --- a/meson.build > +++ b/meson.build > @@ -48,6 +48,11 @@ with_libunwind = get_option('libunwind') > with_asm = get_option('asm') > with_osmesa = get_option('osmesa') > with_swr_arches = get_option('swr-arches').split(',') > +if get_option('tools') == 'all' > + with_tools = ['glsl','intel','nir','nouveau'] > +else > + with_tools = get_option('tools').split(',') > +endif > if get_option('texture-float') >pre_args += '-DTEXTURE_FLOAT_ENABLED' >message('WARNING: Floating-point texture enabled. Please consult > docs/patents.txt and your lawyer before building mesa.') > diff --git a/meson_options.txt b/meson_options.txt > index fca06c4e61d..e89149e76a0 100644 > --- a/meson_options.txt > +++ b/meson_options.txt > @@ -280,3 +280,9 @@ option( >value : 'avx,avx2', >description : 'Comma delemited swr architectures. choices : > avx,avx2,knl,skx' > ) > +option( > + 'tools', > + type : 'string', > + value : '', > + description : 'Comma delimited list of tools to build. choices : > glsl,intel,nir,nouveau or all' > +) > diff --git a/src/compiler/glsl/meson.build b/src/compiler/glsl/meson.build > index b0c0de810a6..6c46e466c96 100644 > --- a/src/compiler/glsl/meson.build > +++ b/src/compiler/glsl/meson.build > @@ -230,7 +230,8 @@ glsl_compiler = executable( >dependencies : [dep_clock, dep_thread], >include_directories : [inc_common], >link_with : [libglsl_standalone], > - build_by_default : false, > + build_by_default : with_tools.contains('glsl'), > + install : true, > ) > > glsl_test = executable( > @@ -242,7 +243,8 @@ glsl_test = executable( >include_directories : [inc_common], >dependencies : [dep_clock, dep_thread], >link_with : [libglsl, libglsl_standalone, libglsl_util], > - build_by_default : false, > + build_by_default : with_tools.contains('glsl'), > + install : true, > ) > > if with_tests > diff --git a/src/compiler/meson.build b/src/compiler/meson.build > index d86bdde61d8..7afcb6386ff 100644 > --- a/src/compiler/meson.build > +++ b/src/compiler/meson.build > @@ -62,7 +62,8 @@ spirv2nir = executable( >include_directories : [inc_common, inc_nir, include_directories('spirv')], >link_with : libmesa_util, >c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args], > - build_by_default : false, > + build_by_default : with_tools.contains('nir'), > + install : true, > ) > > subdir('glsl') > diff --git a/src/gallium/drivers/nouveau/meson.build > b/src/gallium/drivers/nouveau/meson.build > index 8ddd8657991..431eb2f6d22 100644 > --- a/src/gallium/drivers/nouveau/meson.build > +++ b/src/gallium/drivers/nouveau/meson.build > @@ -219,7 +219,8 @@ nouveau_compiler = executable( >include_directories : [inc_src, inc_include, inc_gallium, inc_gallium_aux], >dependencies : [dep_libdrm, dep_libdrm_nouveau], >link_with : [libnouveau, libgallium, libmesa_util], > - build_by_default : false, > + build_by_default : with_tools.contains('nouveau'), > + install : true, > ) > > driver_nouveau = declare_dependency( > diff --git a/src/intel/tools/meson.build b/src/intel/tools/meson.build > index 7890eeca1dc..c6513f3013b 100644 > --- a/src/intel/tools/meson.build > +++ b/src/intel/tools/meson.build > @@ -26,7 +26,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 : with_tools.contains('intel'), > + install : true, > ) > > aubinator_error_decode = executable( > @@ -37,5 +38,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 : with_tools.contains('intel'), > + install : true, > ) > -- > 2.14.3 > signature.asc Description: signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] meson: Add build option for tools
Quoting Scott D Phillips (2018-02-07 16:55:24) > Add a build option to control building some of the misc tools we > have. Also set the executables to install, presumably you want > that if you're asking for the build. > --- > meson.build | 5 + > meson_options.txt | 6 ++ > src/compiler/glsl/meson.build | 6 -- > src/compiler/meson.build| 3 ++- > src/gallium/drivers/nouveau/meson.build | 3 ++- > src/intel/tools/meson.build | 6 -- > 6 files changed, 23 insertions(+), 6 deletions(-) > > diff --git a/meson.build b/meson.build > index b61c285bf00..6ff0c9ad96a 100644 > --- a/meson.build > +++ b/meson.build > @@ -48,6 +48,11 @@ with_libunwind = get_option('libunwind') > with_asm = get_option('asm') > with_osmesa = get_option('osmesa') > with_swr_arches = get_option('swr-arches').split(',') > +if get_option('tools') == 'all' > + with_tools = ['glsl','intel','nir','nouveau'] what should we do if someone provides -Dtools=glsl,all (or similar) > +else > + with_tools = get_option('tools').split(',') > +endif > if get_option('texture-float') >pre_args += '-DTEXTURE_FLOAT_ENABLED' >message('WARNING: Floating-point texture enabled. Please consult > docs/patents.txt and your lawyer before building mesa.') > diff --git a/meson_options.txt b/meson_options.txt > index fca06c4e61d..e89149e76a0 100644 > --- a/meson_options.txt > +++ b/meson_options.txt > @@ -280,3 +280,9 @@ option( >value : 'avx,avx2', >description : 'Comma delemited swr architectures. choices : > avx,avx2,knl,skx' > ) > +option( > + 'tools', > + type : 'string', > + value : '', > + description : 'Comma delimited list of tools to build. choices : > glsl,intel,nir,nouveau or all' > +) > diff --git a/src/compiler/glsl/meson.build b/src/compiler/glsl/meson.build > index b0c0de810a6..6c46e466c96 100644 > --- a/src/compiler/glsl/meson.build > +++ b/src/compiler/glsl/meson.build > @@ -230,7 +230,8 @@ glsl_compiler = executable( >dependencies : [dep_clock, dep_thread], >include_directories : [inc_common], >link_with : [libglsl_standalone], > - build_by_default : false, > + build_by_default : with_tools.contains('glsl'), > + install : true, > ) > > glsl_test = executable( > @@ -242,7 +243,8 @@ glsl_test = executable( >include_directories : [inc_common], >dependencies : [dep_clock, dep_thread], >link_with : [libglsl, libglsl_standalone, libglsl_util], > - build_by_default : false, > + build_by_default : with_tools.contains('glsl'), > + install : true, > ) > > if with_tests > diff --git a/src/compiler/meson.build b/src/compiler/meson.build > index d86bdde61d8..7afcb6386ff 100644 > --- a/src/compiler/meson.build > +++ b/src/compiler/meson.build > @@ -62,7 +62,8 @@ spirv2nir = executable( >include_directories : [inc_common, inc_nir, include_directories('spirv')], >link_with : libmesa_util, >c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args], > - build_by_default : false, > + build_by_default : with_tools.contains('nir'), > + install : true, > ) > > subdir('glsl') > diff --git a/src/gallium/drivers/nouveau/meson.build > b/src/gallium/drivers/nouveau/meson.build > index 8ddd8657991..431eb2f6d22 100644 > --- a/src/gallium/drivers/nouveau/meson.build > +++ b/src/gallium/drivers/nouveau/meson.build > @@ -219,7 +219,8 @@ nouveau_compiler = executable( >include_directories : [inc_src, inc_include, inc_gallium, inc_gallium_aux], >dependencies : [dep_libdrm, dep_libdrm_nouveau], >link_with : [libnouveau, libgallium, libmesa_util], > - build_by_default : false, > + build_by_default : with_tools.contains('nouveau'), > + install : true, > ) > > driver_nouveau = declare_dependency( > diff --git a/src/intel/tools/meson.build b/src/intel/tools/meson.build > index 7890eeca1dc..c6513f3013b 100644 > --- a/src/intel/tools/meson.build > +++ b/src/intel/tools/meson.build > @@ -26,7 +26,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 : with_tools.contains('intel'), > + install : true, > ) > > aubinator_error_decode = executable( > @@ -37,5 +38,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 : with_tools.contains('intel'), > + install : true, > ) > -- > 2.14.3 > signature.asc Description: signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] meson: Add build option for tools
On Thursday, 2018-02-08 01:30:04 -0800, Jordan Justen wrote: > On 2018-02-07 16:55:24, Scott D Phillips wrote: > > diff --git a/src/compiler/glsl/meson.build b/src/compiler/glsl/meson.build > > index b0c0de810a6..6c46e466c96 100644 > > --- a/src/compiler/glsl/meson.build > > +++ b/src/compiler/glsl/meson.build > > @@ -230,7 +230,8 @@ glsl_compiler = executable( > >dependencies : [dep_clock, dep_thread], > >include_directories : [inc_common], > >link_with : [libglsl_standalone], > > - build_by_default : false, > > + build_by_default : with_tools.contains('glsl'), > > + install : true, > > Thanks for looking at this! > > I found that the install will still be attempted even if it isn't > built, so you should add with_tools.contains('foo') to the install > lines as well. I was about to say that, good thing I read the replies first :) > With that: > > Reviewed-by: Jordan JustenReviewed-by: Eric Engestrom ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] meson: Add build option for tools
On 2018-02-07 16:55:24, Scott D Phillips wrote: > diff --git a/src/compiler/glsl/meson.build b/src/compiler/glsl/meson.build > index b0c0de810a6..6c46e466c96 100644 > --- a/src/compiler/glsl/meson.build > +++ b/src/compiler/glsl/meson.build > @@ -230,7 +230,8 @@ glsl_compiler = executable( >dependencies : [dep_clock, dep_thread], >include_directories : [inc_common], >link_with : [libglsl_standalone], > - build_by_default : false, > + build_by_default : with_tools.contains('glsl'), > + install : true, Thanks for looking at this! I found that the install will still be attempted even if it isn't built, so you should add with_tools.contains('foo') to the install lines as well. With that: Reviewed-by: Jordan Justen___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] meson: Add build option for tools
Scott D Phillipswrites: > Add a build option to control building some of the misc tools we > have. Also set the executables to install, presumably you want > that if you're asking for the build. I took a look, since I've got some WIP vc5 tools that really should live in Mesa instead of an external tree. I like it. Reviewed-by: Eric Anholt signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] meson: Add build option for tools
Add a build option to control building some of the misc tools we have. Also set the executables to install, presumably you want that if you're asking for the build. --- meson.build | 5 + meson_options.txt | 6 ++ src/compiler/glsl/meson.build | 6 -- src/compiler/meson.build| 3 ++- src/gallium/drivers/nouveau/meson.build | 3 ++- src/intel/tools/meson.build | 6 -- 6 files changed, 23 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index b61c285bf00..6ff0c9ad96a 100644 --- a/meson.build +++ b/meson.build @@ -48,6 +48,11 @@ with_libunwind = get_option('libunwind') with_asm = get_option('asm') with_osmesa = get_option('osmesa') with_swr_arches = get_option('swr-arches').split(',') +if get_option('tools') == 'all' + with_tools = ['glsl','intel','nir','nouveau'] +else + with_tools = get_option('tools').split(',') +endif if get_option('texture-float') pre_args += '-DTEXTURE_FLOAT_ENABLED' message('WARNING: Floating-point texture enabled. Please consult docs/patents.txt and your lawyer before building mesa.') diff --git a/meson_options.txt b/meson_options.txt index fca06c4e61d..e89149e76a0 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -280,3 +280,9 @@ option( value : 'avx,avx2', description : 'Comma delemited swr architectures. choices : avx,avx2,knl,skx' ) +option( + 'tools', + type : 'string', + value : '', + description : 'Comma delimited list of tools to build. choices : glsl,intel,nir,nouveau or all' +) diff --git a/src/compiler/glsl/meson.build b/src/compiler/glsl/meson.build index b0c0de810a6..6c46e466c96 100644 --- a/src/compiler/glsl/meson.build +++ b/src/compiler/glsl/meson.build @@ -230,7 +230,8 @@ glsl_compiler = executable( dependencies : [dep_clock, dep_thread], include_directories : [inc_common], link_with : [libglsl_standalone], - build_by_default : false, + build_by_default : with_tools.contains('glsl'), + install : true, ) glsl_test = executable( @@ -242,7 +243,8 @@ glsl_test = executable( include_directories : [inc_common], dependencies : [dep_clock, dep_thread], link_with : [libglsl, libglsl_standalone, libglsl_util], - build_by_default : false, + build_by_default : with_tools.contains('glsl'), + install : true, ) if with_tests diff --git a/src/compiler/meson.build b/src/compiler/meson.build index d86bdde61d8..7afcb6386ff 100644 --- a/src/compiler/meson.build +++ b/src/compiler/meson.build @@ -62,7 +62,8 @@ spirv2nir = executable( include_directories : [inc_common, inc_nir, include_directories('spirv')], link_with : libmesa_util, c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args], - build_by_default : false, + build_by_default : with_tools.contains('nir'), + install : true, ) subdir('glsl') diff --git a/src/gallium/drivers/nouveau/meson.build b/src/gallium/drivers/nouveau/meson.build index 8ddd8657991..431eb2f6d22 100644 --- a/src/gallium/drivers/nouveau/meson.build +++ b/src/gallium/drivers/nouveau/meson.build @@ -219,7 +219,8 @@ nouveau_compiler = executable( include_directories : [inc_src, inc_include, inc_gallium, inc_gallium_aux], dependencies : [dep_libdrm, dep_libdrm_nouveau], link_with : [libnouveau, libgallium, libmesa_util], - build_by_default : false, + build_by_default : with_tools.contains('nouveau'), + install : true, ) driver_nouveau = declare_dependency( diff --git a/src/intel/tools/meson.build b/src/intel/tools/meson.build index 7890eeca1dc..c6513f3013b 100644 --- a/src/intel/tools/meson.build +++ b/src/intel/tools/meson.build @@ -26,7 +26,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 : with_tools.contains('intel'), + install : true, ) aubinator_error_decode = executable( @@ -37,5 +38,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 : with_tools.contains('intel'), + install : true, ) -- 2.14.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev