diff --git a/CMakeLists.txt b/CMakeLists.txt index a6339290f9..e20e5d5fcd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6653,15 +6653,18 @@ set(OPTIMIZED_C_FLAGS "-std=c99 -O3") set(EXE_LDFLAGS " ") if(MSVC) set(EXE_LDFLAGS "/STACK:16777216") -elseif(ZIG_STATIC) +elseif(MINGW) + set(EXE_LDFLAGS "${EXE_LDFLAGS} -Wl,--stack,16777216") +endif() + +if(ZIG_STATIC) if(APPLE) set(EXE_LDFLAGS "-static-libgcc -static-libstdc++") else() set(EXE_LDFLAGS "-static") endif() -else() - set(EXE_LDFLAGS " ") endif() + if(ZIG_TEST_COVERAGE) set(EXE_CFLAGS "${EXE_CFLAGS} -fprofile-arcs -ftest-coverage") set(EXE_LDFLAGS "${EXE_LDFLAGS} -fprofile-arcs -ftest-coverage")