mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-02-06 06:55:07 +00:00
Fix aot debugger compilation error on windows (#3370)
Fix aot debugger compilation error on windows as reported in #3184. And update the stack size configuration for product-mini zephyr sample since the native stack overflow check was enhanced and the zephyr-sdk was also upgraded.
This commit is contained in:
parent
120b9659dd
commit
e11eae93e2
|
@ -7,7 +7,6 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
@ -56,6 +55,12 @@ typedef struct JITDescriptor {
|
||||||
JITCodeEntry *first_entry_;
|
JITCodeEntry *first_entry_;
|
||||||
} JITDescriptor;
|
} JITDescriptor;
|
||||||
|
|
||||||
|
#if defined(_WIN32) || defined(_WIN32_)
|
||||||
|
#define attribute_noinline __declspec(noinline)
|
||||||
|
#else
|
||||||
|
#define attribute_noinline __attribute__((noinline))
|
||||||
|
#endif
|
||||||
|
|
||||||
/* LLVM has already define this */
|
/* LLVM has already define this */
|
||||||
#if (WASM_ENABLE_WAMR_COMPILER == 0) && (WASM_ENABLE_JIT == 0)
|
#if (WASM_ENABLE_WAMR_COMPILER == 0) && (WASM_ENABLE_JIT == 0)
|
||||||
/**
|
/**
|
||||||
|
@ -63,9 +68,11 @@ typedef struct JITDescriptor {
|
||||||
* To prevent GCC from inlining or removing it we place noinline attribute
|
* To prevent GCC from inlining or removing it we place noinline attribute
|
||||||
* and inline assembler statement inside.
|
* and inline assembler statement inside.
|
||||||
*/
|
*/
|
||||||
void __attribute__((noinline)) __jit_debug_register_code();
|
void attribute_noinline
|
||||||
|
__jit_debug_register_code();
|
||||||
|
|
||||||
void __attribute__((noinline)) __jit_debug_register_code()
|
void attribute_noinline
|
||||||
|
__jit_debug_register_code()
|
||||||
{
|
{
|
||||||
int x;
|
int x;
|
||||||
*(char *)&x = '\0';
|
*(char *)&x = '\0';
|
||||||
|
|
|
@ -1420,7 +1420,7 @@ execute_malloc_function(WASMModuleInstance *module_inst, WASMExecEnv *exec_env,
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
argc = 1;
|
argc = 1;
|
||||||
argv[0] = size;
|
argv[0] = (uint32)size;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if __retain is exported, then this module is compiled by
|
/* if __retain is exported, then this module is compiled by
|
||||||
|
|
|
@ -4,3 +4,4 @@
|
||||||
CONFIG_STACK_SENTINEL=y
|
CONFIG_STACK_SENTINEL=y
|
||||||
CONFIG_PRINTK=y
|
CONFIG_PRINTK=y
|
||||||
CONFIG_LOG=y
|
CONFIG_LOG=y
|
||||||
|
CONFIG_LOG_BUFFER_SIZE=4096
|
||||||
|
|
|
@ -16,30 +16,17 @@
|
||||||
#endif /* end of BUILD_TARGET_RISCV64_LP64 || BUILD_TARGET_RISCV32_ILP32 */
|
#endif /* end of BUILD_TARGET_RISCV64_LP64 || BUILD_TARGET_RISCV32_ILP32 */
|
||||||
|
|
||||||
#if defined(BUILD_TARGET_RISCV64_LP64) || defined(BUILD_TARGET_RISCV32_ILP32)
|
#if defined(BUILD_TARGET_RISCV64_LP64) || defined(BUILD_TARGET_RISCV32_ILP32)
|
||||||
#if defined(BUILD_TARGET_RISCV64_LP64)
|
|
||||||
#define CONFIG_GLOBAL_HEAP_BUF_SIZE 4360
|
|
||||||
#define CONFIG_APP_STACK_SIZE 288
|
|
||||||
#define CONFIG_MAIN_THREAD_STACK_SIZE 2400
|
|
||||||
#else
|
|
||||||
#define CONFIG_GLOBAL_HEAP_BUF_SIZE 5120
|
#define CONFIG_GLOBAL_HEAP_BUF_SIZE 5120
|
||||||
#define CONFIG_APP_STACK_SIZE 512
|
#define CONFIG_APP_STACK_SIZE 512
|
||||||
#define CONFIG_MAIN_THREAD_STACK_SIZE 4096
|
#define CONFIG_APP_HEAP_SIZE 512
|
||||||
#endif
|
|
||||||
#define CONFIG_APP_HEAP_SIZE 256
|
|
||||||
#else /* else of BUILD_TARGET_RISCV64_LP64 || BUILD_TARGET_RISCV32_ILP32 */
|
#else /* else of BUILD_TARGET_RISCV64_LP64 || BUILD_TARGET_RISCV32_ILP32 */
|
||||||
|
|
||||||
#define CONFIG_GLOBAL_HEAP_BUF_SIZE WASM_GLOBAL_HEAP_SIZE
|
#define CONFIG_GLOBAL_HEAP_BUF_SIZE WASM_GLOBAL_HEAP_SIZE
|
||||||
#define CONFIG_APP_STACK_SIZE 8192
|
#define CONFIG_APP_STACK_SIZE 8192
|
||||||
#define CONFIG_APP_HEAP_SIZE 8192
|
#define CONFIG_APP_HEAP_SIZE 8192
|
||||||
|
|
||||||
#ifdef CONFIG_NO_OPTIMIZATIONS
|
|
||||||
#define CONFIG_MAIN_THREAD_STACK_SIZE 8192
|
|
||||||
#else
|
|
||||||
#define CONFIG_MAIN_THREAD_STACK_SIZE 4096
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* end of BUILD_TARGET_RISCV64_LP64 || BUILD_TARGET_RISCV32_ILP32 */
|
#endif /* end of BUILD_TARGET_RISCV64_LP64 || BUILD_TARGET_RISCV32_ILP32 */
|
||||||
|
|
||||||
|
#define CONFIG_MAIN_THREAD_STACK_SIZE 8192
|
||||||
|
|
||||||
static int app_argc;
|
static int app_argc;
|
||||||
static char **app_argv;
|
static char **app_argv;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user