From 8bca36460aa788c373ab795351909c9f86e2e837 Mon Sep 17 00:00:00 2001 From: Blisto91 Date: Sun, 10 Nov 2024 13:56:23 +0100 Subject: [PATCH] [dxvk] Log build target and compiler used --- buildenv.h.in | 6 ++++++ meson.build | 10 ++++++++++ src/dxvk/dxvk_instance.cpp | 2 ++ 3 files changed, 18 insertions(+) create mode 100644 buildenv.h.in diff --git a/buildenv.h.in b/buildenv.h.in new file mode 100644 index 00000000..5cfaa4ed --- /dev/null +++ b/buildenv.h.in @@ -0,0 +1,6 @@ +#pragma once + +#define DXVK_TARGET "@BUILD_TARGET@" +#define DXVK_COMPILER "@BUILD_COMPILER@" +#define DXVK_COMPILER_VERSION "@BUILD_COMPILER_VERSION@" + diff --git a/meson.build b/meson.build index 59606e3f..a9d8efb7 100644 --- a/meson.build +++ b/meson.build @@ -205,6 +205,16 @@ dxvk_version = vcs_tag( output: 'version.h', ) +conf_data = configuration_data() +conf_data.set('BUILD_COMPILER', cpp.get_id()) +conf_data.set('BUILD_COMPILER_VERSION', cpp.version()) +conf_data.set('BUILD_TARGET', cpu_family) +dxvk_buildenv = configure_file( + configuration : conf_data, + input: 'buildenv.h.in', + output: 'buildenv.h', +) + if platform != 'windows' subdir('include/native') endif diff --git a/src/dxvk/dxvk_instance.cpp b/src/dxvk/dxvk_instance.cpp index d79c1953..2aea8814 100644 --- a/src/dxvk/dxvk_instance.cpp +++ b/src/dxvk/dxvk_instance.cpp @@ -1,4 +1,5 @@ #include +#include #include "dxvk_instance.h" #include "dxvk_openvr.h" @@ -20,6 +21,7 @@ namespace dxvk { DxvkInstance::DxvkInstance(const DxvkInstanceImportInfo& args, DxvkInstanceFlags flags) { Logger::info(str::format("Game: ", env::getExeName())); Logger::info(str::format("DXVK: ", DXVK_VERSION)); + Logger::info(str::format("Build: ", DXVK_TARGET, " ", DXVK_COMPILER, " ", DXVK_COMPILER_VERSION)); wsi::init();