From cd12bc0c2053c1235bd0aa9fdf84ac67e4f6e9cc Mon Sep 17 00:00:00 2001 From: Mr-Wiseguy Date: Mon, 7 Oct 2024 01:35:56 -0400 Subject: [PATCH] Disable identical code folding to prevent mods from conflicting with themselves due to merged functions --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d4ef3ef..0b900bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -196,6 +196,11 @@ else() ) endif() +if (MSVC) + # Disable identical code folding, since this breaks mod function patching as multiple functions can get merged into one. + target_link_options(Zelda64Recompiled PRIVATE /OPT:NOICF) +endif() + if (WIN32) include(FetchContent)