From 326a0735426eefb5451d312925463be4e416a0df Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Sun, 14 Mar 2021 22:43:09 -0400 Subject: [PATCH] Disable /OPT:ICF on windows, it merges identical functions breaking icall symbol lookup. --- src/mono/mono/mini/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mono/mono/mini/CMakeLists.txt b/src/mono/mono/mini/CMakeLists.txt index a517a70735a167..c7efa1fb442bb8 100644 --- a/src/mono/mono/mini/CMakeLists.txt +++ b/src/mono/mono/mini/CMakeLists.txt @@ -45,6 +45,11 @@ if(ENABLE_PERFTRACING) endif(ENABLE_PERFTRACING) +if(HOST_WIN32) + # /OPT:ICF merges idential functions breaking mono_lookup_icall_symbol () + add_link_options(/OPT:NOICF) +endif() + # ICU if(HAVE_SYS_ICU) if(STATIC_ICU)