diff --git a/config.nims b/config.nims index 67eb10e56..392624a7e 100644 --- a/config.nims +++ b/config.nims @@ -33,10 +33,15 @@ else: switch("passC", "-mno-avx512f") switch("passL", "-mno-avx512f") -# omitting frame pointers in nim breaks the GC +# Omitting frame pointers in nim breaks the GC: # https://github.com/nim-lang/Nim/issues/10625 -switch("passC", "-fno-omit-frame-pointer") -switch("passL", "-fno-omit-frame-pointer") +if not defined(windows): + # ...except on Windows where the Nim bug doesn't manifest and the option + # crashes GCC in some Mingw-w64 versions: + # https://sourceforge.net/p/mingw-w64/bugs/880/ + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86593 + switch("passC", "-fno-omit-frame-pointer") + switch("passL", "-fno-omit-frame-pointer") --threads:on --opt:speed