-
-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LTO build of rpcs3 fails #483
Comments
Technically, this repo is for the llvm-mingw packaging, and for upstream Clang issues the relevant place is https://github.com/llvm/llvm-project/issues - but I guess the issue can be reproduced with plain llvm-mingw too. In any case - in order to be able to dig further into it, can the issue be reduced down to a minimal selfcontained testcase? |
I reduced it
cmake_minimum_required(VERSION 3.21)
project(lto VERSION 0.0.1 LANGUAGES C CXX)
add_executable(myexe src/myexe.cpp)
target_compile_features(myexe PRIVATE cxx_std_20)
target_link_options(myexe PRIVATE -municode)
set_property(TARGET myexe PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
#include "perf_meter.hpp"
int wmain(int argc, wchar_t** argv)
{
perf_meter<"DMA"_u32> perf_;
return 0;
}
template <auto ShortName> class perf_stat final {
static inline thread_local struct perf_stat_local {
// Local non-atomic values for increments
unsigned m_log[66]{};
perf_stat_local() noexcept {}
~perf_stat_local() {}
} g_tls_perf_stat;
public:
static void push(unsigned start_time) noexcept { (void)g_tls_perf_stat; }
};
template <auto ShortName, auto... SubEvents> class perf_meter {
public:
~perf_meter() { perf_stat<ShortName>::push(0); }
};
constexpr unsigned operator""_u32(const char* s, unsigned long long /*length*/)
{
return 0;
} |
Hello I use clang 19.1.7 from MSYS2 clang64. Recently https://github.com/RPCS3/rpcs3 has enabled LTO. Now the release build is failing with
The text was updated successfully, but these errors were encountered: