diff options
| author | snowstormxd <214507868+snowstormxd@users.noreply.github.com> | 2026-11-02 21:14:39 +0000 |
|---|---|---|
| committer | snowstormxd <214507868+snowstormxd@users.noreply.github.com> | 2026-11-02 21:14:39 +0000 |
| commit | 85436a5acd36108f8163efbb638945feba567ab4 (patch) | |
| tree | 2d1c4b2c47d1214b25ff09f8eb38f8f16a272997 /src | |
| parent | 06e211e0d0a1634d16f1d74d75682092fc92a5de (diff) | |
kernel: keep migrating fiber TLS lookups outside link-time optimization
The game aborted during early thread synchronization with cross-module kernel TLS lookups. Compiling the kernel TLS implementation without LTO restores successful game startup while the other targets retain their build options.
Assisted by Codex.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index eeb3202d12..1ff9f271d2 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -1290,4 +1290,9 @@ else() target_sources(core PRIVATE hle/service/ssl/ssl_backend_none.cpp) endif() +if (ENABLE_LTO AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" AND NOT MSVC) + # Fibers can migrate between host threads; keep kernel TLS lookups outside LTO callers. + set_source_files_properties(hle/kernel/kernel.cpp PROPERTIES COMPILE_OPTIONS -fno-lto) +endif() + create_target_directory_groups(core) |
