[Mesa-stable] [PATCH 4/4] swr: automake: don't ship LLVM version specific generated sources

Rowley, Timothy O timothy.o.rowley at intel.com
Wed Jun 22 19:44:52 UTC 2016


Couple of minor comments inlined below.

Tested-by: Tim Rowley <timothy.o.rowley at intel.com>

> On Jun 22, 2016, at 7:04 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> 
> From: Emil Velikov <emil.velikov at collabora.com>
> 
> Otherwise things will fail to build, if the builder is using another
> version of LLVM.
> 
> v2: annotate all the dependencies of builder_gen.h
> v3: clean the generated files as needed
> 
> Cc: "12.0" <mesa-stable at lists.freedesktop.org>
> Cc: Tim Rowley <timothy.o.rowley at intel.com>
> Cc: Chuck Atkins <chuck.atkins at kitware.com>
> Tested-by: Chuck Atkins <chuck.atkins at kitware.com> (v2)
> Reported-by: Chuck Atkins <chuck.atkins at kitware.com>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
> src/gallium/drivers/swr/Makefile.am | 48 +++++++++++++++++++++++++++++++++++--
> 1 file changed, 46 insertions(+), 2 deletions(-)
> 
> diff --git a/src/gallium/drivers/swr/Makefile.am b/src/gallium/drivers/swr/Makefile.am
> index d896154..30087be 100644
> --- a/src/gallium/drivers/swr/Makefile.am
> +++ b/src/gallium/drivers/swr/Makefile.am
> @@ -52,8 +52,6 @@ BUILT_SOURCES = \
> 	rasterizer/scripts/gen_knobs.cpp \
> 	rasterizer/scripts/gen_knobs.h \
> 	rasterizer/jitter/state_llvm.h \
> -	rasterizer/jitter/builder_gen.h \
> -	rasterizer/jitter/builder_gen.cpp \
> 	rasterizer/jitter/builder_x86.h \
> 	rasterizer/jitter/builder_x86.cpp
> 
> @@ -122,6 +120,34 @@ COMMON_LDFLAGS = \
> 	$(NO_UNDEFINED) \
> 	$(LLVM_LDFLAGS)
> 
> +
> +# XXX: As we cannot use BUILT_SOURCES (the files will end up in the dist
> +# tarball) just annotate the dependency directly.
> +# As the single direct user of builder_gen.h is a header (builder.h) trace all
> +# the translusive users (one that use the latter header).
> +#
> +# Note: one should really clean the includes a bit, according to Tim there's
> +# only 4 users of the builder_gen methods/API.

This note can be removed; I was thinking of the final users of the builder class, and forgot about the other files which make up the definition.

> +rasterizer/jitter/blend_jit.cpp: rasterizer/jitter/builder_gen.h
> +rasterizer/jitter/builder.cpp: rasterizer/jitter/builder_gen.h
> +rasterizer/jitter/builder_gen.cpp: rasterizer/jitter/builder_gen.h
> +rasterizer/jitter/builder_x86.cpp: rasterizer/jitter/builder_gen.h
> +rasterizer/jitter/builder_misc.cpp: rasterizer/jitter/builder_gen.h
> +rasterizer/jitter/fetch_jit.cpp: rasterizer/jitter/builder_gen.h
> +rasterizer/jitter/streamout_jit.cpp: rasterizer/jitter/builder_gen.h
> +swr_shader.cpp: rasterizer/jitter/builder_gen.h
> +
> +CLEANFILES = \
> +	rasterizer/jitter/builder_gen.h \
> +	rasterizer/jitter/builder_gen.cpp
> +
> +# XXX: Due to the funky dependencies above, the buildder_x86.cpp file gets

buildder -> builder

> +# generated (copied) into builddir when building from release tarball.
> +# Add a temporary workaround to remove it, until the above issue is resolved.
> +distclean-local:
> +	( test $(top_srcdir) != $(top_builddir) && \
> +		rm $(builddir)/rasterizer/jitter/builder_x86.cpp ) || true
> +
> lib_LTLIBRARIES = libswrAVX.la libswrAVX2.la
> 
> libswrAVX_la_CXXFLAGS = \
> @@ -132,6 +158,15 @@ libswrAVX_la_CXXFLAGS = \
> libswrAVX_la_SOURCES = \
> 	$(COMMON_SOURCES)
> 
> +# XXX: Don't ship these generated sources for now, since they are specific
> +# to the LLVM version they are generated from. Thus a release tarball
> +# containing the said files, generated against eg. LLVM 3.8 will fail to build
> +# on systems with other versions of LLVM eg. 3.7 or 3.6.
> +# Move these back to BUILT_SOURCES once that is resolved.
> +nodist_libswrAVX_la_SOURCES = \
> +	rasterizer/jitter/builder_gen.h \
> +	rasterizer/jitter/builder_gen.cpp
> +
> libswrAVX_la_LIBADD = \
> 	$(COMMON_LIBADD)
> 
> @@ -146,6 +181,15 @@ libswrAVX2_la_CXXFLAGS = \
> libswrAVX2_la_SOURCES = \
> 	$(COMMON_SOURCES)
> 
> +# XXX: Don't ship these generated sources for now, since they are specific
> +# to the LLVM version they are generated from. Thus a release tarball
> +# containing the said files, generated against eg. LLVM 3.8 will fail to build
> +# on systems with other versions of LLVM eg. 3.7 or 3.6.
> +# Move these back to BUILT_SOURCES once that is resolved.
> +nodist_libswrAVX2_la_SOURCES = \
> +	rasterizer/jitter/builder_gen.h \
> +	rasterizer/jitter/builder_gen.cpp
> +
> libswrAVX2_la_LIBADD = \
> 	$(COMMON_LIBADD)
> 
> -- 
> 2.8.2
> 
> _______________________________________________
> mesa-stable mailing list
> mesa-stable at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-stable



More information about the mesa-stable mailing list