[Mesa-stable] [Mesa-dev] [PATCH] configure.ac: detect LLVM patch level when built via cmake

Tom Stellard tom at stellard.net
Tue Sep 9 08:26:41 PDT 2014


On Sat, Sep 06, 2014 at 01:43:55AM +1000, Jonathan Gray wrote:
> In LLVM 3.4.1 and 3.4.2 the patch level was only set in config.h when
> LLVM was built via autoconf and not when it was built with cmake.
> Fall back to retrieving the patch level from llvm-config --version to
> handle this case.
> 

We should extract LLVM_VERSION_PATH from $LLVM_VERSION and then we won't
have to worry about which config file it is in.

-Tom

> Cc: "10.2 10.3" <mesa-stable at lists.freedesktop.org>
> Signed-off-by: Jonathan Gray <jsg at jsg.id.au>
> ---
>  configure.ac | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/configure.ac b/configure.ac
> index 99ae6ba..98cd938 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1705,6 +1705,15 @@ if test "x$enable_gallium_llvm" = xyes; then
>              [#include "${LLVM_INCLUDEDIR}/llvm/Config/config.h"],
>              LLVM_VERSION_PATCH=0) dnl Default if LLVM_VERSION_PATCH not found
>  
> +        dnl In LLVM 3.4.1 and 3.4.2 the patch level was only set in config.h
> +        dnl for autoconf builds and not cmake builds
> +        if test "$LLVM_VERSION_PATCH" -eq 0; then
> +            LLVM_VERSION_PATCH=`echo $LLVM_VERSION | cut -d. -f3`
> +            if test -z "$LLVM_VERSION_PATCH"; then
> +                LLVM_VERSION_PATCH=0
> +            fi
> +        fi
> +
>          if test -n "${LLVM_VERSION_MAJOR}"; then
>              LLVM_VERSION_INT="${LLVM_VERSION_MAJOR}0${LLVM_VERSION_MINOR}"
>          else
> -- 
> 1.9.3
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-stable mailing list