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

@@ -629,7 +629,7 @@ static void
radv_dump_device_name(struct radv_device *device, FILE *f)
{
struct radeon_info *info = &device->physical_device->rad_info;
char llvm_string[32] = {}, kernel_version[128] = {};
char kernel_version[128] = {};
struct utsname uname_data;
const char *chip_name;
@@ -639,14 +639,11 @@ radv_dump_device_name(struct radv_device *device, FILE *f)
snprintf(kernel_version, sizeof(kernel_version),
" / %s", uname_data.release);
snprintf(llvm_string, sizeof(llvm_string),
", LLVM %i.%i.%i", (HAVE_LLVM >> 8) & 0xff,
HAVE_LLVM & 0xff, MESA_LLVM_VERSION_PATCH);
fprintf(f, "Device name: %s (%s DRM %i.%i.%i%s%s)\n\n",
fprintf(f, "Device name: %s (%s DRM %i.%i.%i%s, LLVM "
MESA_LLVM_VERSION_STRING ")\n\n",
chip_name, device->physical_device->name,
info->drm_major, info->drm_minor, info->drm_patchlevel,
kernel_version, llvm_string);
kernel_version);
}
static bool