summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott D Phillips <[email protected]>2018-02-07 16:55:24 -0800
committerScott D Phillips <[email protected]>2018-02-08 11:24:42 -0800
commit1f4d2433e73a0a6d4e2a180de407970d983309db (patch)
treeee69bacbb0af123566f2d2c4320127626cd5cca9
parent464d057c86ab36db81590aa940902ff7e29894da (diff)
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. v2: set 'install:' to the with_tools value, not true (Jordan) handle 'all' in a the comma list (Dylan) Add freedreno's tools (Dylan) Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
-rw-r--r--meson.build4
-rw-r--r--meson_options.txt6
-rw-r--r--src/compiler/glsl/meson.build6
-rw-r--r--src/compiler/meson.build3
-rw-r--r--src/gallium/drivers/freedreno/meson.build3
-rw-r--r--src/gallium/drivers/nouveau/meson.build3
-rw-r--r--src/intel/tools/meson.build6
7 files changed, 24 insertions, 7 deletions
diff --git a/meson.build b/meson.build
index b61c285bf00..b39e2f8ab96 100644
--- a/meson.build
+++ b/meson.build
@@ -48,6 +48,10 @@ with_libunwind = get_option('libunwind')
with_asm = get_option('asm')
with_osmesa = get_option('osmesa')
with_swr_arches = get_option('swr-arches').split(',')
+with_tools = get_option('tools').split(',')
+if with_tools.contains('all')
+ with_tools = ['freedreno', 'glsl', 'intel', 'nir', 'nouveau']
+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..7fafe2deaac 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 : freedreno,glsl,intel,nir,nouveau or all'
+)
diff --git a/src/compiler/glsl/meson.build b/src/compiler/glsl/meson.build
index b0c0de810a6..26ab4f1c8d3 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 : with_tools.contains('glsl'),
)
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 : with_tools.contains('glsl'),
)
if with_tests
diff --git a/src/compiler/meson.build b/src/compiler/meson.build
index d86bdde61d8..e955e66f811 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 : with_tools.contains('nir'),
)
subdir('glsl')
diff --git a/src/gallium/drivers/freedreno/meson.build b/src/gallium/drivers/freedreno/meson.build
index ef70cc08c74..f334d2d8ef8 100644
--- a/src/gallium/drivers/freedreno/meson.build
+++ b/src/gallium/drivers/freedreno/meson.build
@@ -249,5 +249,6 @@ ir3_compiler = executable(
libglsl_standalone,
libmesa_util,
],
- build_by_default : true,
+ build_by_default : with_tools.contains('freedreno'),
+ install : with_tools.contains('freedreno'),
)
diff --git a/src/gallium/drivers/nouveau/meson.build b/src/gallium/drivers/nouveau/meson.build
index 8ddd8657991..e44be2616e7 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 : with_tools.contains('nouveau'),
)
driver_nouveau = declare_dependency(
diff --git a/src/intel/tools/meson.build b/src/intel/tools/meson.build
index 7890eeca1dc..82413041b13 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 : with_tools.contains('intel'),
)
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 : with_tools.contains('intel'),
)