Open ThisNekoGuy opened 2 years ago
See https://gcc.gnu.org/wiki/LinkTimeOptimizationFAQ
Adding set_source_files_properties(FastJmp.cpp PROPERTIES COMPILE_FLAGS -fno-lto)
into common/src/Utilities/CMakeLists.txt fixes the issue.
Telling a certain source file just not to compile with LTO is still an inability to compile with LTO; furthermore, this only proves that there is a problem that can be solved and it shouldn't fall to anyone trying to compile it to solve it
It will be the fix in upstream: https://github.com/PCSX2/pcsx2/pull/4938
PCSX2 version:
Latest git build as of October 16th, 2021
Description of the issue:
Compiling libretro-PCSX2 fails with GCC Link Time Optimization (LTO) enabled.
(Not directly related but similar, Clang compiler support and Clang LTO support should be added as well but this currently doesn't directly impact this issue.)
How to reproduce the issue:
Compile the project with the GCC compiler with LTO enabled.
Last known version to work:
Supposedly worked before the last commit.
PC specifications:
OS: Arch Linux CPU: Ryzen 3700X