aboutsummaryrefslogtreecommitdiff
path: root/src/core/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/CMakeLists.txt')
-rw-r--r--src/core/CMakeLists.txt5
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)