[Mesa-dev] [PATCH 2/2] Add LLVM version to Mesa version strings

Serge Martin edb+mesa at sigluy.net
Mon May 23 17:38:06 UTC 2016


On Monday 23 May 2016 09:21:51 Giuseppe Bilotta wrote:
> Code generation (kernel compilation) may sometimes hit LLVM-specific
> bugs. Adding the used LLVM version to the version string may make bug
> triaging easier. (This was inspired by a similar patch recently
> proposed for pocl.)
> 
> Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
> ---
>  configure.ac                                  | 3 ++-
>  src/gallium/state_trackers/clover/Makefile.am | 1 +
>  src/mesa/main/version_string.h                | 2 +-
>  3 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 6eee2bc..400dd9e 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -2122,7 +2122,7 @@ if test "x$enable_gallium_llvm" = xyes; then
>              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" +        DEFINES="${DEFINES}
> -DHAVE_LLVM=0x0$LLVM_VERSION_INT
> -DMESA_LLVM_VERSION_PATCH=$LLVM_VERSION_PATCH
> '-DMESA_LLVM_VERSION_STRING=\"$LLVM_VERSION_MAJOR.$LLVM_VERSION_MINOR.$LLVM
> _VERSION_PATCH\"'" MESA_LLVM=1

version string could be retrieve with
LLVM_VERSION_STRING=`$LLVM_CONFIG --version`

this way you keep the svn string part e.g. 3.9.0svn for current ToT

> 
>          dnl Check for Clang internal headers
> @@ -2137,6 +2137,7 @@ if test "x$enable_gallium_llvm" = xyes; then
>      else
>          MESA_LLVM=0
>          LLVM_VERSION_INT=0
> +        DEFINES="${DEFINES} '-DMESA_LLVM_VERSION_STRING=\"\"'"
>      fi
>  else
>      MESA_LLVM=0
> diff --git a/src/gallium/state_trackers/clover/Makefile.am
> b/src/gallium/state_trackers/clover/Makefile.am index 4c9d7d9..f6f3d7f
> 100644
> --- a/src/gallium/state_trackers/clover/Makefile.am
> +++ b/src/gallium/state_trackers/clover/Makefile.am
> @@ -50,6 +50,7 @@ libclllvm_la_SOURCES = $(LLVM_SOURCES)
> 
>  libclover_la_CXXFLAGS = \
>  	-std=c++11 \
> +	$(DEFINES) \
>  	$(VISIBILITY_CXXFLAGS)
> 
>  libclover_la_LIBADD = \
> diff --git a/src/mesa/main/version_string.h b/src/mesa/main/version_string.h
> index 970cc8b..b175293 100644
> --- a/src/mesa/main/version_string.h
> +++ b/src/mesa/main/version_string.h
> @@ -30,5 +30,5 @@
>  #define MESA_GIT_SHA1_SUFFIX ""
>  #endif
> 
> -#define MESA_VERSION_SUFFIX " Mesa " PACKAGE_VERSION MESA_GIT_SHA1_SUFFIX
> +#define MESA_VERSION_SUFFIX " Mesa " PACKAGE_VERSION MESA_GIT_SHA1_SUFFIX
> MESA_LLVM_VERSION_STRING



More information about the mesa-dev mailing list