[Mesa-dev] [PATCH 01/17] scons: Build NIR.
Eric Anholt
eric at anholt.net
Tue May 10 19:28:19 UTC 2016
Rob Clark <robdclark at gmail.com> writes:
> From: Jose Fonseca <jfonseca at vmware.com>
>
> Signed-off-by: Rob Clark <robclark at freedesktop.org>
> ---
> src/compiler/SConscript | 57 +++++++++++++++++++++++++++++++++++++++++++++++--
> 1 file changed, 55 insertions(+), 2 deletions(-)
>
> diff --git a/src/compiler/SConscript b/src/compiler/SConscript
> index 10c79c4..dde4dfd 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')
Possibly s/nir_sources/sources/ to reduce diff, but either way,
Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160510/83ae988b/attachment.sig>
More information about the mesa-dev
mailing list