From fe9953fc4945f7b07abf1ebb8b0b8f5c64ec565a Mon Sep 17 00:00:00 2001 From: Alexander Bondarenko <486682+dpwiz@users.noreply.github.com> Date: Fri, 24 Nov 2023 22:00:20 +0200 Subject: [PATCH] desktop: remove GC flag when building on windows (#3455) * desktop: remove GC flag when building on windows * add correct define --- .../common/src/commonMain/cpp/desktop/simplex-api.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/multiplatform/common/src/commonMain/cpp/desktop/simplex-api.c b/apps/multiplatform/common/src/commonMain/cpp/desktop/simplex-api.c index e2cd7ed55c..1c4ad1142e 100644 --- a/apps/multiplatform/common/src/commonMain/cpp/desktop/simplex-api.c +++ b/apps/multiplatform/common/src/commonMain/cpp/desktop/simplex-api.c @@ -8,8 +8,13 @@ void hs_init_with_rtsopts(int * argc, char **argv[]); JNIEXPORT void JNICALL Java_chat_simplex_common_platform_CoreKt_initHS(JNIEnv *env, jclass clazz) { +#ifdef _WIN32 + int argc = 4; + char *argv[] = {"simplex", "+RTS", "-A16m", "-H64m", NULL}; // non-moving GC is broken on windows with GHC 9.4-9.6.3 +#else int argc = 5; char *argv[] = {"simplex", "+RTS", "-A16m", "-H64m", "-xn", NULL}; // see android/simplex-api.c for details +#endif char **pargv = argv; hs_init_with_rtsopts(&argc, &pargv); }