summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorTheGreatRambler <31906920+TheGreatRambler@users.noreply.github.com>2022-05-10 22:35:00 -0700
committerGitHub <noreply@github.com>2022-05-10 22:35:00 -0700
commite209fcbc3fc66db775ec65d85dbd64a6069c1681 (patch)
tree309dea1b26a6b055adb5bd551df3d7fb393d5259 /CMakeLists.txt
parent4a24f6cf2a287f91597378b97bf80cf1e4f9ecb2 (diff)
downloadbinaryen-e209fcbc3fc66db775ec65d85dbd64a6069c1681.tar.gz
binaryen-e209fcbc3fc66db775ec65d85dbd64a6069c1681.tar.bz2
binaryen-e209fcbc3fc66db775ec65d85dbd64a6069c1681.zip
Fix setting of stack size when building with clang for windows (#4654)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c7b45da0d..050e0ff43 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -273,7 +273,11 @@ else()
if(WIN32)
add_compile_flag("-D_GNU_SOURCE")
add_compile_flag("-D__STDC_FORMAT_MACROS")
- add_link_flag("-Wl,--stack,8388608")
+ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ add_link_flag("-Wl,/stack:8388608")
+ else()
+ add_link_flag("-Wl,--stack,8388608")
+ endif()
elseif(NOT EMSCRIPTEN)
add_compile_flag("-fPIC")
endif()