diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index b93080f2a1..490d57f14f 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt @@ -444,6 +444,10 @@ if (YUZU_ROOM) target_link_libraries(yuzu PRIVATE yuzu-room) endif() +if (LINKER STREQUAL "lld") + target_link_options(yuzu-cmd PRIVATE "LINKER:--icf=all") +endif() + if (NOT MSVC AND (APPLE OR NOT YUZU_STATIC_BUILD)) # needed for vma target_compile_options(yuzu PRIVATE diff --git a/src/yuzu_cmd/CMakeLists.txt b/src/yuzu_cmd/CMakeLists.txt index 09a9bd6da1..11fe0e255b 100644 --- a/src/yuzu_cmd/CMakeLists.txt +++ b/src/yuzu_cmd/CMakeLists.txt @@ -67,6 +67,10 @@ endif() create_target_directory_groups(yuzu-cmd) +if (LINKER STREQUAL "lld") + target_link_options(yuzu-cmd PRIVATE "LINKER:--icf=all") +endif() + # needed for vma if (NOT MSVC) target_compile_options(yuzu-cmd PRIVATE