<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Thanks for doing this; I would have been hunting for the dist-hook: magic for a while.
<div class=""><br class="">
</div>
<div class="">Tested “make dist” on llvm-3.9.0 (works) and llvm-4.0/llvm-svn (fails, expected desired behavior).</div>
<div class=""><br class="">
</div>
<div class="">Built result of llvm-3.9.0 “make dist” with llvm-4.0 and llvm-svn and it compiles/works.</div>
<div class=""><br class="">
</div>
<div class="">Reviewed-by: Tim Rowley <<a href="mailto:timothy.o.rowley@intel.com" class="">timothy.o.rowley@intel.com</a>></div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On May 19, 2017, at 12:31 PM, Emil Velikov <<a href="mailto:emil.l.velikov@gmail.com" class="">emil.l.velikov@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">From: Emil Velikov <<a href="mailto:emil.velikov@collabora.com" class="">emil.velikov@collabora.com</a>><br class="">
<br class="">
As gen_builder.hpp file is generated, it contains information that is<br class="">
specific to the LLVM version it originates from.<br class="">
<br class="">
As suggested by Tim, the file seems to be forwards compatible. So in<br class="">
order to produce ship a file which will work everywhere we should be<br class="">
using earlies supported LLVM - 3.9.<br class="">
<br class="">
With this we're back on track and can build all of mesa without<br class="">
python/mako/flex and friends.<br class="">
<br class="">
In the long term we might want to see if the python generators can be<br class="">
updated to produce LLVM version agnostic files. At least within the<br class="">
range supported by SWR.<br class="">
<br class="">
Cc: <<a href="mailto:mesa-stable@lists.freedesktop.org" class="">mesa-stable@lists.freedesktop.org</a>><br class="">
Cc: Chuck Atkins <<a href="mailto:chuck.atkins@kitware.com" class="">chuck.atkins@kitware.com</a>><br class="">
Cc: Tim Rowley <<a href="mailto:timothy.o.rowley@intel.com" class="">timothy.o.rowley@intel.com</a>><br class="">
Signed-off-by: Emil Velikov <<a href="mailto:emil.velikov@collabora.com" class="">emil.velikov@collabora.com</a>><br class="">
---<br class="">
configure.ac                        |  4 ++++<br class="">
src/gallium/drivers/swr/Makefile.am | 41 ++++++++++---------------------------<br class="">
2 files changed, 15 insertions(+), 30 deletions(-)<br class="">
<br class="">
diff --git a/configure.ac b/configure.ac<br class="">
index ce5301f3e45..3d10a4b8935 100644<br class="">
--- a/configure.ac<br class="">
+++ b/configure.ac<br class="">
@@ -2472,6 +2472,10 @@ if test -n "$with_gallium_drivers"; then<br class="">
    done<br class="">
fi<br class="">
<br class="">
+# XXX: Keep in sync with LLVM_REQUIRED_SWR<br class="">
+AM_CONDITIONAL(SWR_INVALID_LLVM_VERSION, test "x$LLVM_VERSION" != x3.9.0 -a \<br class="">
+                                              "x$LLVM_VERSION" != x3.9.1)<br class="">
+<br class="">
if test "x$enable_llvm" = "xyes" -a "$with_gallium_drivers"; then<br class="">
    llvm_require_version $LLVM_REQUIRED_GALLIUM "gallium"<br class="">
    llvm_add_default_components "gallium"<br class="">
diff --git a/src/gallium/drivers/swr/Makefile.am b/src/gallium/drivers/swr/Makefile.am<br class="">
index 0d71f52b1e6..7b2da074162 100644<br class="">
--- a/src/gallium/drivers/swr/Makefile.am<br class="">
+++ b/src/gallium/drivers/swr/Makefile.am<br class="">
@@ -56,6 +56,7 @@ BUILT_SOURCES = \<br class="">
<span class="Apple-tab-span" style="white-space:pre"></span>rasterizer/codegen/gen_knobs.cpp \<br class="">
<span class="Apple-tab-span" style="white-space:pre"></span>rasterizer/codegen/gen_knobs.h \<br class="">
<span class="Apple-tab-span" style="white-space:pre"></span>rasterizer/jitter/gen_state_llvm.h \<br class="">
+<span class="Apple-tab-span" style="white-space:pre"> </span>rasterizer/jitter/gen_builder.hpp \<br class="">
<span class="Apple-tab-span" style="white-space:pre"></span>rasterizer/jitter/gen_builder_x86.hpp \<br class="">
<span class="Apple-tab-span" style="white-space:pre"></span>rasterizer/archrast/gen_ar_event.hpp \<br class="">
<span class="Apple-tab-span" style="white-space:pre"></span>rasterizer/archrast/gen_ar_event.cpp \<br class="">
@@ -168,20 +169,6 @@ COMMON_LDFLAGS = \<br class="">
<span class="Apple-tab-span" style="white-space:pre"></span>$(LLVM_LDFLAGS)<br class="">
<br class="">
<br class="">
-# XXX: As we cannot use BUILT_SOURCES (the files will end up in the dist<br class="">
-# tarball) just annotate the dependency directly.<br class="">
-# As the single direct user of gen_builder.hpp is a header (builder.h) trace all<br class="">
-# the translusive users (one that use the latter header).<br class="">
-rasterizer/jitter/blend_jit.cpp: rasterizer/jitter/gen_builder.hpp<br class="">
-rasterizer/jitter/builder.cpp: rasterizer/jitter/gen_builder.hpp<br class="">
-rasterizer/jitter/builder_misc.cpp: rasterizer/jitter/gen_builder.hpp<br class="">
-rasterizer/jitter/fetch_jit.cpp: rasterizer/jitter/gen_builder.hpp<br class="">
-rasterizer/jitter/streamout_jit.cpp: rasterizer/jitter/gen_builder.hpp<br class="">
-swr_shader.cpp: rasterizer/jitter/gen_builder.hpp<br class="">
-<br class="">
-CLEANFILES = \<br class="">
-<span class="Apple-tab-span" style="white-space:pre"> </span>rasterizer/jitter/gen_builder.hpp<br class="">
-<br class="">
lib_LTLIBRARIES = <a href="http://libswrAVX.la" class="">libswrAVX.la</a> <a href="http://libswrAVX2.la" class="">
libswrAVX2.la</a><br class="">
<br class="">
libswrAVX_la_CXXFLAGS = \<br class="">
@@ -192,14 +179,6 @@ libswrAVX_la_CXXFLAGS = \<br class="">
libswrAVX_la_SOURCES = \<br class="">
<span class="Apple-tab-span" style="white-space:pre"></span>$(COMMON_SOURCES)<br class="">
<br class="">
-# XXX: Don't ship these generated sources for now, since they are specific<br class="">
-# to the LLVM version they are generated from. Thus a release tarball<br class="">
-# containing the said files, generated against eg. LLVM 3.8 will fail to build<br class="">
-# on systems with other versions of LLVM eg. 3.7 or 3.6.<br class="">
-# Move these back to BUILT_SOURCES once that is resolved.<br class="">
-nodist_libswrAVX_la_SOURCES = \<br class="">
-<span class="Apple-tab-span" style="white-space:pre"> </span>rasterizer/jitter/gen_builder.hpp<br class="">
-<br class="">
libswrAVX_la_LIBADD = \<br class="">
<span class="Apple-tab-span" style="white-space:pre"></span>$(COMMON_LIBADD)<br class="">
<br class="">
@@ -214,14 +193,6 @@ libswrAVX2_la_CXXFLAGS = \<br class="">
libswrAVX2_la_SOURCES = \<br class="">
<span class="Apple-tab-span" style="white-space:pre"></span>$(COMMON_SOURCES)<br class="">
<br class="">
-# XXX: Don't ship these generated sources for now, since they are specific<br class="">
-# to the LLVM version they are generated from. Thus a release tarball<br class="">
-# containing the said files, generated against eg. LLVM 3.8 will fail to build<br class="">
-# on systems with other versions of LLVM eg. 3.7 or 3.6.<br class="">
-# Move these back to BUILT_SOURCES once that is resolved.<br class="">
-nodist_libswrAVX2_la_SOURCES = \<br class="">
-<span class="Apple-tab-span" style="white-space:pre"> </span>rasterizer/jitter/gen_builder.hpp<br class="">
-<br class="">
libswrAVX2_la_LIBADD = \<br class="">
<span class="Apple-tab-span" style="white-space:pre"></span>$(COMMON_LIBADD)<br class="">
<br class="">
@@ -230,6 +201,16 @@ libswrAVX2_la_LDFLAGS = \<br class="">
<br class="">
include $(top_srcdir)/install-gallium-links.mk<br class="">
<br class="">
+# Generated gen_builder.hpp is not backwards compatible. So ship only one<br class="">
+# created with the oldest supported version of LLVM.<br class="">
+dist-hook:<br class="">
+if SWR_INVALID_LLVM_VERSION<br class="">
+<span class="Apple-tab-span" style="white-space:pre"> </span>@echo "*******************************************************"<br class="">
+<span class="Apple-tab-span" style="white-space:pre"> </span>@echo "LLVM 3.9.0 or LLVM 3.9.1 required to create the tarball"<br class="">
+<span class="Apple-tab-span" style="white-space:pre"> </span>@echo "*******************************************************"<br class="">
+<span class="Apple-tab-span" style="white-space:pre"> </span>@test<br class="">
+endif<br class="">
+<br class="">
EXTRA_DIST = \<br class="">
<span class="Apple-tab-span" style="white-space:pre"></span>SConscript \<br class="">
<span class="Apple-tab-span" style="white-space:pre"></span>rasterizer/archrast/events.proto \<br class="">
-- <br class="">
2.12.2<br class="">
<br class="">
_______________________________________________<br class="">
mesa-stable mailing list<br class="">
<a href="mailto:mesa-stable@lists.freedesktop.org" class="">mesa-stable@lists.freedesktop.org</a><br class="">
https://lists.freedesktop.org/mailman/listinfo/mesa-stable<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>