cmake/win32: set default LINK_STACKSIZE to avoid stack overflow

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an 2023-07-13 22:15:03 +08:00 committed by Xiang Xiao
parent 8277229f53
commit 73a06a4975
1 changed files with 4 additions and 0 deletions

View File

@ -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}>)