Fix windows

This commit is contained in:
Oleksandr
2025-07-28 11:08:40 -04:00
parent 3d93379132
commit 6f91b8f8d1
2 changed files with 17 additions and 3 deletions

View File

@@ -68,6 +68,11 @@ target_link_libraries(xrpl.imports.main
wamr::wamr
)
if (WIN32)
target_link_libraries(xrpl.imports.main INTERFACE ntdll)
endif()
include(add_module)
include(target_link_modules)

View File

@@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 88a1642b..aeb29912 100644
index 88a1642b..e9eab7ec 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,7 @@
@@ -11,6 +11,15 @@ index 88a1642b..aeb29912 100644
option(BUILD_SHARED_LIBS "Build using shared libraries" OFF)
@@ -170,7 +170,7 @@ if (MINGW)
endif ()
if (WIN32)
- target_link_libraries(vmlib PRIVATE ntdll)
+ target_link_libraries(vmlib PUBLIC ntdll)
endif()
set (WAMR_PUBLIC_HEADERS
diff --git a/core/iwasm/aot/aot_runtime.c b/core/iwasm/aot/aot_runtime.c
index b2c9ed62..87947a18 100644
--- a/core/iwasm/aot/aot_runtime.c
@@ -389,7 +398,7 @@ index ddc0b15b..3a707878 100644
#if WASM_ENABLE_TAGS != 0
diff --git a/core/iwasm/interpreter/wasm_interp_classic.c b/core/iwasm/interpreter/wasm_interp_classic.c
index 1e98b0fa..db6278c5 100644
index 1e98b0fa..e77fdfcd 100644
--- a/core/iwasm/interpreter/wasm_interp_classic.c
+++ b/core/iwasm/interpreter/wasm_interp_classic.c
@@ -1569,13 +1569,14 @@ get_global_addr(uint8 *global_data, WASMGlobalInstance *global)
@@ -406,7 +415,7 @@ index 1e98b0fa..db6278c5 100644
+#define CHECK_INSTRUCTION_LIMIT() \
+ do { \
+ --instructions_left; \
+ if (instructions_left <= 0) { \
+ if (instructions_left < 0) { \
+ wasm_set_exception(module, "instruction limit exceeded"); \
+ goto got_exception; \
+ } \