[Mesa-dev] [PATCH v3 12/25] configure.ac: Move gallium LLVM checks
Tobias Droste
tdroste at gmx.de
Wed Oct 12 18:14:21 UTC 2016
Am Mittwoch, 12. Oktober 2016, 10:42:19 CEST schrieb Emil Velikov:
> On 12 October 2016 at 00:02, Tobias Droste <tdroste at gmx.de> wrote:
> >
> > 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)
Right now --enable-gallium-llvm will be set to no if it is "auto" on non x86.
gallivm/llvm use the x86 target so it probably only works there, that's why I
did it this way.
>
> -Emil
More information about the mesa-dev
mailing list