[Mesa-dev] [PATCH v3 08/25] configure.ac: Move LLVM version check to the top

Tobias Droste tdroste at gmx.de
Wed Oct 12 19:08:33 UTC 2016


Am Mittwoch, 12. Oktober 2016, 20:02:24 CEST schrieb Emil Velikov:
> >> With the above
> >> Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
> >> 
> >> > +    if test -z "${LLVM_CONFIG}"; then
> >> > +        if test -n "$llvm_prefix"; then
> >> > +            AC_PATH_TOOL([LLVM_CONFIG], [llvm-config], [no],
> >> > ["$llvm_prefix/bin"]) +        else
> >> > +            AC_PATH_TOOL([LLVM_CONFIG], [llvm-config], [no])
> >> > +        fi
> >> > +    fi
> >> > +
> >> > +    if test "x$LLVM_CONFIG" != xno; then
> >> > +        LLVM_VERSION=`$LLVM_CONFIG --version | egrep -o '^[[0-9.]]+'`
> >> 
> >> ...
> >> 
> >> > +    else
> >> > +        MESA_LLVM=0
> >> > +        LLVM_VERSION_INT=0
> >> 
> >> Just realised that we should error out in this case. After all one
> >> requests llvm, so silently ignoring that they're missing llvm-config
> >> isn't a smart idea. Something like below (be that as a preparatory,
> >> in-between or at the end of the series) would be great.
> > 
> > At this point in time we don't know if we actually need LLVM.
> 
> Looking at the code in master (and at this point in your series) I see
> no way how this can happen.
> Can you point out where/how we can get that ?
> 
> Either way... this is in the "follow-up" ideas category.

After my last patches in the series LLVM is checked without any condition at 
the beginning of the configure process. This way I have this info everywhere.

Later a driver who needs just calls llvm_check_version_for() and this function 
then bails out if there's not LLVM_CONFIG because version 0 is always smaller 
then the requested version.

The user gets a message stating he needs LLVM version x.y.z. for driver d.
Which is more usefull than a general "LLVM is missing" message.

After he gets this message he can either install LLVM or remove the driver 
from --with-gallium-drivers/--with-vulkan-driver

> 
> -Emil


More information about the mesa-dev mailing list