On 12 October 2016 at 00:02, Tobias Droste <[email protected]> wrote: > There's already a function for gallium LLVM checks. > Move the remaining code to this function and call it for every driver > that uses LLVM. > > Signed-off-by: Tobias Droste <[email protected]> > --- > configure.ac | 31 +++++++++++++------------------ > 1 file changed, 13 insertions(+), 18 deletions(-) > > diff --git a/configure.ac b/configure.ac > index 283e553..61a0253 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -2310,18 +2310,6 @@ if test "x$enable_gallium_llvm" = xauto; then > esac > fi > > -gallium_llvm_check() { > - LLVM_REQUIRED_VERSION_MAJOR="3" > - LLVM_REQUIRED_VERSION_MINOR="3" > - if test "$LLVM_VERSION_INT" -lt > "${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}"; then > - AC_MSG_ERROR([LLVM > $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer is > required]) > - fi > -} > - > -if test "x$enable_gallium_llvm" = xyes; then > - gallium_llvm_check > -fi > - > dnl Directory for XVMC libs > AC_ARG_WITH([xvmc-libdir], > [AS_HELP_STRING([--with-xvmc-libdir=DIR], > @@ -2378,12 +2366,16 @@ gallium_require_drm() { > } > > gallium_require_llvm() { > - if test "x$MESA_LLVM" = x0; then > - case "$host" in *gnux32) return;; esac > - case "$host_cpu" in > - i*86|x86_64|amd64) AC_MSG_ERROR([LLVM is required to build $1 on x86 > and x86_64]);; > - esac > - fi > + case "$host" in *gnux32) return;; esac > + case "$host_cpu" in > + i*86|x86_64|amd64) > + LLVM_REQUIRED_VERSION_MAJOR="3" > + LLVM_REQUIRED_VERSION_MINOR="3" > + if test "$LLVM_VERSION_INT" -lt > "${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}"; then > + AC_MSG_ERROR([LLVM > $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer is > required]) > + fi > + ;; > + esac > } > The function it quite "ugly" as-is and this patch changes things in a fun way.
Namely: before you'll get the minimum required version check regardless of host_cpu for everyone, while now you get the opposite - everyone is 'constrained' by the host_cpu check. Admittedly I've have not idea if llvmpipe is a thing on outside x86 land. Checking the gallium_require_llvm users we want: - swr -> bail out if host_cpu !x86/x86-64 or gallium-llvm toggle is off || llvm version req. is not met - r300 -> on host_cpu eq. x86/x86-64, check the gallium-llvm toggle (this is 'premature' optimisation which we might want to rework/drop in the long run) -Emil _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
