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

Ian Romanick idr at freedesktop.org
Tue May 24 18:17:30 UTC 2016


On 05/23/2016 07:45 AM, Marek Olšák wrote:
> I think it would be better to put stuff like this only into the
> renderer string of drivers which use LLVM. The majority of drivers
> don't care about the LLVM version.

Yes.  In fact, I *really* don't want the LLVM version to show up in the
glxinfo from the i965 or i915 (classic) drivers.  Drivers can already
tack extra stuff on to the renderer string (like the AGP speed!), so
maybe it's best to use that mechanism.

> Marek
> 
> On Mon, May 23, 2016 at 9:21 AM, Giuseppe Bilotta
> <giuseppe.bilotta at gmail.com> 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
>>
>>          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
>>
>> --
>> 2.8.1.372.g9612035
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 



More information about the mesa-dev mailing list