This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 73a06a4975 cmake/win32: set default LINK_STACKSIZE to avoid stack
overflow
73a06a4975 is described below
commit 73a06a4975966294f99d507ee074ebe343a1aab7
Author: chao an <[email protected]>
AuthorDate: Thu Jul 13 22:15:03 2023 +0800
cmake/win32: set default LINK_STACKSIZE to avoid stack overflow
Signed-off-by: chao an <[email protected]>
---
CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5fedeaa335..4dda33be20 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -603,6 +603,10 @@ if(NOT CONFIG_ARCH_SIM)
endif()
elseif(WIN32)
target_link_options(nuttx PUBLIC /SAFESEH:NO)
+ math(EXPR LINK_STACKSIZE
+ "${CONFIG_SIM_STACKSIZE_ADJUSTMENT} + ${CONFIG_IDLETHREAD_STACKSIZE}"
+ OUTPUT_FORMAT DECIMAL)
+ target_link_options(nuttx PUBLIC /STACK:${LINK_STACKSIZE},${LINK_STACKSIZE})
set(nuttx_libs_paths)
foreach(lib ${nuttx_libs})
list(APPEND nuttx_libs_paths $<TARGET_FILE:${lib}>)