[Mesa-dev] [PATCH v3 04/25] configure.ac: Move oCL checks out of LLVM version check

Emil Velikov emil.l.velikov at gmail.com
Wed Oct 12 08:56:39 UTC 2016


On 12 October 2016 at 00:02, Tobias Droste <tdroste at gmx.de> wrote:
> The openCL checks don't need to be inside the LLVM version check.
> "llvm_check_version_for" also works if LLVM wasn't found.
>
> Signed-off-by: Tobias Droste <tdroste at gmx.de>
> ---
>  configure.ac | 33 +++++++++++++++++----------------
>  1 file changed, 17 insertions(+), 16 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index e48ed57..dcd59fc 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -2284,24 +2284,8 @@ if test "x$enable_gallium_llvm" = xyes || test "x$HAVE_RADEON_VULKAN" = xyes; th
>
>          llvm_add_default_components
>
> -        if test "x$enable_opencl" = xyes; then
> -            llvm_check_version_for "3" "6" "0" "opencl"
> -
> -            LLVM_COMPONENTS="${LLVM_COMPONENTS} all-targets ipo linker instrumentation"
> -            LLVM_COMPONENTS="${LLVM_COMPONENTS} irreader option objcarcopts profiledata"
> -        fi
>          DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT -DMESA_LLVM_VERSION_PATCH=$LLVM_VERSION_PATCH"
>          MESA_LLVM=1
> -
> -        dnl Check for Clang internal headers
> -        if test "x$enable_opencl" = xyes; then
> -            if test -z "$CLANG_LIBDIR"; then
> -                CLANG_LIBDIR=${LLVM_LIBDIR}
> -            fi
> -            CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
> -            AS_IF([test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"],
> -                [AC_MSG_ERROR([Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries.])])
> -        fi
>      else
>          MESA_LLVM=0
>          LLVM_VERSION_INT=0
> @@ -2315,6 +2299,23 @@ else
>      fi
>  fi
>
> +if test "x$enable_opencl" = xyes; then
> +    llvm_check_version_for "3" "6" "0" "opencl"
> +
> +    LLVM_COMPONENTS="${LLVM_COMPONENTS} all-targets ipo linker instrumentation"
> +    LLVM_COMPONENTS="${LLVM_COMPONENTS} irreader option objcarcopts profiledata"
> +fi
> +
> +dnl Check for Clang internal headers
> +if test "x$enable_opencl" = xyes; then
Nit: drop the second if test, yet preserve the comment ?
Disclaimer: haven't looked if later patches depend on the split.

With the above
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

-Emil


More information about the mesa-dev mailing list