aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authoremekoi <emekankurumeh@outlook.com>2019-06-23 01:15:04 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-06-23 16:51:12 -0400
commitca3660f6bf3a1f8d77692acf72eefe148802d342 (patch)
treef94961744b12851cdd78c86bdb1096082d769b70 /CMakeLists.txt
parent9153b17c922e3166a824d300781ca4e6da015787 (diff)
downloadzig-ca3660f6bf3a1f8d77692acf72eefe148802d342.tar.gz
zig-ca3660f6bf3a1f8d77692acf72eefe148802d342.zip
increase stack size for mingw
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 6 insertions, 3 deletions
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")