From 448666c896d9ff12bd832ac7c4818a5f35b6c814 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Thu, 23 Jan 2025 15:28:51 +0100 Subject: [PATCH] Log LLVM version --- rpcs3/Emu/System.cpp | 17 +++++++++++++++++ rpcs3/main.cpp | 1 + 2 files changed, 18 insertions(+) diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index cb3182302666..0bb4311b6407 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -62,6 +62,10 @@ #include "Emu/RSX/GSRender.h" +#ifdef LLVM_AVAILABLE +#include "llvm/Config/llvm-config.h" +#endif + LOG_CHANNEL(sys_log, "SYS"); // Preallocate 32 MiB @@ -345,6 +349,19 @@ extern void dump_executable(std::span data, const ppu_module* void Emulator::Init() { + // Log LLVM version + if (static bool logged_llvm = false; !logged_llvm) + { +#ifndef LLVM_AVAILABLE + sys_log.always()("LLVM version: Compiled without LLVM"); +#elif defined (LLVM_VERSION_STRING) + sys_log.always()("LLVM version: %s", LLVM_VERSION_STRING); +#else + sys_log.always()("LLVM version: Unknown"); +#endif + logged_llvm = true; + } + jit_runtime::initialize(); const std::string emu_dir = rpcs3::utils::get_emu_dir(); diff --git a/rpcs3/main.cpp b/rpcs3/main.cpp index 894115ecc89e..a6078bf9e52c 100644 --- a/rpcs3/main.cpp +++ b/rpcs3/main.cpp @@ -665,6 +665,7 @@ int main(int argc, char** argv) logs::stored_message qt{(strcmp(QT_VERSION_STR, qVersion()) != 0) ? sys_log.error : sys_log.notice}; qt.text = fmt::format("Qt version: Compiled against Qt %s | Run-time uses Qt %s", QT_VERSION_STR, qVersion()); + // Write current time logs::stored_message time{sys_log.always()}; time.text = fmt::format("Current Time: %s", std::chrono::system_clock::now());