simplify LLVM version string printing

Figure it out once in the build system, then just use that all over the place.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Eric Engestrom
2019-03-14 13:58:54 +00:00
committed by Eric Engestrom
parent 593614f4d4
commit 05b114e526
7 changed files with 21 additions and 47 deletions

View File

@@ -1234,17 +1234,9 @@ if _llvm != 'false'
endif
if with_llvm
_llvm_version = dep_llvm.version().split('.')
# 3 digits versions in LLVM only started from 3.4.1 on
if dep_llvm.version().version_compare('>= 3.4.1')
_llvm_patch = _llvm_version[2]
else
_llvm_patch = '0'
endif
pre_args += [
'-DHAVE_LLVM=0x0@0@0@1@'.format(_llvm_version[0], _llvm_version[1]),
'-DMESA_LLVM_VERSION_PATCH=@0@'.format(_llvm_patch),
'-DMESA_LLVM_VERSION_STRING="@0@"'.format(dep_llvm.version()),
]
# LLVM can be built without rtti, turning off rtti changes the ABI of C++