Would it be feasible for packaging purposes to generate multiple headers, i.e. gen_builder._llvm38.hpp, gen_builder_llvm39.hpp, gen_builder_llvm40.hpp, etc. and then have gen_builder.hpp be a stub that just has something like:
#include <llvm.h> #if llvm_version >= 4.0 #include "gen_builder_llvm40.hpp" #elif llvm_version >= 3.9 #include "gen_builder_llvm39.hpp" #elif llvm_version >= 3.8 #include "gen_builder_llvm38.hpp" #else #error llvm version >= 3.8 is required #elif Using the appropriate version checks of course (this is just pseudo code to show the concept) ---------- Chuck Atkins Staff R&D Engineer, Scientific Computing Kitware, Inc. On Thu, May 18, 2017 at 2:06 PM, Kai Wasserbäch <[email protected]> wrote: > Hey, > Emil Velikov wrote on 18.05.2017 18:17: > > On 18 May 2017 at 16:34, Rowley, Timothy O <[email protected]> > wrote: > >> We could use a gen_builder.h generated from llvm-3.9 for all current > >> versions of llvm at this time (as the changes are now just llvm IR > >> additions), but I’m not sure how to enforce that the person creating the > >> tarball has a particular version of llvm installed. > >> > > Must admit that I don't know much about LLVM or SWR, so I hope you've > > thoroughly tested LLVM 3.9 generated files built with LLVM 4.0 or > > later. > > Using LLVM 3.9 should be doable, but I'm curious if we can avoid such > > 'acrobatics' in the long run. > > > > Any ideas, if that's at all possible? > > how about the SWR maintainers provide a "golden" fallback file, that is > pre-generated and known good for all supported LLVM (right now I would > guess > that to be 3.9 and 4.0) versions? That file is always shipped in the > tarball. > > During build there's a rule, that checks if $generator is there. If not, > the > fallback file is copied to the correct name, otherwise the regular > generation > takes place. > > Cheers, > Kai > > > _______________________________________________ > mesa-dev mailing list > [email protected] > https://lists.freedesktop.org/mailman/listinfo/mesa-dev > >
_______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
