[Mesa-dev] [PATCH] scons: Build NIR.
Rob Clark
robdclark at gmail.com
Sat Apr 9 23:19:14 UTC 2016
On Sat, Apr 9, 2016 at 7:16 PM, Rob Clark <robdclark at gmail.com> wrote:
> From: Jose Fonseca <jfonseca at vmware.com>
>
> Signed-off-by: Rob Clark <robclark at freedesktop.org>
> ---
I should have added that this was originally Jose's patch and I
rebased on the src/compiler move..
he had additional patches to make NIR build w/ MSVC, but this is
enough (with one additional bit squashed into mesa/st NIR patch) to
make scons build for linux work with my gallium NIR patchset.
BR,
-R
> src/compiler/SConscript | 57 +++++++++++++++++++++++++++++++++++++++++++++++--
> 1 file changed, 55 insertions(+), 2 deletions(-)
>
> diff --git a/src/compiler/SConscript b/src/compiler/SConscript
> index 8d71b82..8a0823e 100644
> --- a/src/compiler/SConscript
> +++ b/src/compiler/SConscript
> @@ -1,5 +1,7 @@
> Import('*')
>
> +from sys import executable as python_cmd
> +
> env = env.Clone()
>
> env.MSVC2013Compat()
> @@ -11,13 +13,64 @@ env.Prepend(CPPPATH = [
> '#src/mesa',
> '#src/gallium/include',
> '#src/gallium/auxiliary',
> + '#src/compiler',
> + '#src/compiler/nir',
> +])
> +
> +
> +# Make generated headers reachable from the include path.
> +env.Append(CPPPATH = [
> + Dir('nir').abspath
> ])
>
> -sources = env.ParseSourceList('Makefile.sources', 'LIBCOMPILER_FILES')
> +# nir generated sources
> +
> +nir_builder_opcodes_h = env.CodeGenerate(
> + target = 'nir/nir_builder_opcodes.h',
> + script = 'nir/nir_builder_opcodes_h.py',
> + source = [],
> + command = python_cmd + ' $SCRIPT > $TARGET'
> +)
> +
> +env.CodeGenerate(
> + target = 'nir/nir_constant_expressions.c',
> + script = 'nir/nir_constant_expressions.py',
> + source = [],
> + command = python_cmd + ' $SCRIPT > $TARGET'
> +)
> +
> +env.CodeGenerate(
> + target = 'nir/nir_opcodes.h',
> + script = 'nir/nir_opcodes_h.py',
> + source = [],
> + command = python_cmd + ' $SCRIPT > $TARGET'
> +)
> +
> +env.CodeGenerate(
> + target = 'nir/nir_opcodes.c',
> + script = 'nir/nir_opcodes_c.py',
> + source = [],
> + command = python_cmd + ' $SCRIPT > $TARGET'
> +)
> +
> +env.CodeGenerate(
> + target = 'nir/nir_opt_algebraic.c',
> + script = 'nir/nir_algebraic.py',
> + source = [],
> + command = python_cmd + ' $SCRIPT > $TARGET'
> +)
> +
> +# parse Makefile.sources
> +source_lists = env.ParseSourceList('Makefile.sources')
> +
> +nir_sources = []
> +nir_sources += source_lists['LIBCOMPILER_FILES']
> +nir_sources += source_lists['NIR_FILES']
> +nir_sources += source_lists['NIR_GENERATED_FILES']
>
> compiler = env.ConvenienceLibrary(
> target = 'compiler',
> - source = sources
> + source = nir_sources
> )
> Export('compiler')
>
> --
> 2.5.5
>
More information about the mesa-dev
mailing list