Add wamrc AoT compiler building support for Windows(MSVC) (#332)
This commit is contained in:
@ -29,6 +29,16 @@ typedef struct {
|
||||
#define REG_ATOMIC_WAIT_SYM()
|
||||
#endif
|
||||
|
||||
#if (defined(_WIN32) || defined(_WIN32_)) && defined(NDEBUG)
|
||||
#define REG_COMMON_SYMBOLS \
|
||||
REG_SYM(aot_set_exception_with_id), \
|
||||
REG_SYM(aot_invoke_native), \
|
||||
REG_SYM(aot_call_indirect), \
|
||||
REG_SYM(wasm_runtime_enlarge_memory), \
|
||||
REG_SYM(wasm_runtime_set_exception), \
|
||||
REG_BULK_MEMORY_SYM() \
|
||||
REG_ATOMIC_WAIT_SYM()
|
||||
#else /* else of (defined(_WIN32) || defined(_WIN32_)) && defined(NDEBUG) */
|
||||
#define REG_COMMON_SYMBOLS \
|
||||
REG_SYM(aot_set_exception_with_id), \
|
||||
REG_SYM(aot_invoke_native), \
|
||||
@ -49,6 +59,7 @@ typedef struct {
|
||||
REG_SYM(rintf), \
|
||||
REG_BULK_MEMORY_SYM() \
|
||||
REG_ATOMIC_WAIT_SYM()
|
||||
#endif /* end of (defined(_WIN32) || defined(_WIN32_)) && defined(NDEBUG) */
|
||||
|
||||
#define CHECK_RELOC_OFFSET(data_size) do { \
|
||||
if (!check_reloc_offset(target_section_size, reloc_offset, data_size, \
|
||||
|
||||
@ -1747,7 +1747,7 @@ aot_set_aux_stack(WASMExecEnv *exec_env,
|
||||
set the initial value for the global */
|
||||
uint32 global_offset =
|
||||
module->globals[stack_top_idx].data_offset;
|
||||
uint8 *global_addr = module_inst->global_data.ptr + global_offset;
|
||||
uint8 *global_addr = (uint8 *)module_inst->global_data.ptr + global_offset;
|
||||
*(int32*)global_addr = start_offset;
|
||||
|
||||
/* The aux stack boundary is a constant value,
|
||||
|
||||
@ -15,11 +15,13 @@ void __umoddi3();
|
||||
|
||||
static SymbolMap target_sym_map[] = {
|
||||
REG_COMMON_SYMBOLS
|
||||
#if !defined(_WIN32) && !defined(_WIN32_)
|
||||
/* compiler-rt symbols that come from compiler(e.g. gcc) */
|
||||
REG_SYM(__divdi3),
|
||||
REG_SYM(__udivdi3),
|
||||
REG_SYM(__moddi3),
|
||||
REG_SYM(__umoddi3)
|
||||
#endif
|
||||
};
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user