mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-07-12 15:33:16 +00:00
Enable runtime API exposure for MSVC builds (#4287)
This commit is contained in:
parent
3ab9f84026
commit
3580d1a386
|
@ -152,10 +152,6 @@ include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake)
|
||||||
set (THREADS_PREFER_PTHREAD_FLAG ON)
|
set (THREADS_PREFER_PTHREAD_FLAG ON)
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
|
|
||||||
if (MSVC)
|
|
||||||
add_definitions(-DCOMPILING_WASM_RUNTIME_API=1)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
add_library (vmlib ${WAMR_RUNTIME_LIB_SOURCE})
|
add_library (vmlib ${WAMR_RUNTIME_LIB_SOURCE})
|
||||||
set_target_properties (vmlib PROPERTIES OUTPUT_NAME iwasm)
|
set_target_properties (vmlib PROPERTIES OUTPUT_NAME iwasm)
|
||||||
target_include_directories(vmlib INTERFACE
|
target_include_directories(vmlib INTERFACE
|
||||||
|
|
|
@ -193,6 +193,13 @@ else()
|
||||||
enable_language (ASM)
|
enable_language (ASM)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# it will expose the runtime APIs.
|
||||||
|
# you'll use the following command to check the exported APIs
|
||||||
|
# dumpbin.exe /EXPORTS xxx
|
||||||
|
if (MSVC)
|
||||||
|
add_compile_definitions(COMPILING_WASM_RUNTIME_API=1)
|
||||||
|
endif ()
|
||||||
|
|
||||||
include (${SHARED_PLATFORM_CONFIG})
|
include (${SHARED_PLATFORM_CONFIG})
|
||||||
include (${SHARED_DIR}/mem-alloc/mem_alloc.cmake)
|
include (${SHARED_DIR}/mem-alloc/mem_alloc.cmake)
|
||||||
include (${IWASM_DIR}/common/iwasm_common.cmake)
|
include (${IWASM_DIR}/common/iwasm_common.cmake)
|
||||||
|
|
|
@ -16,8 +16,6 @@ set (CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
|
||||||
add_definitions(-DCOMPILING_WASM_RUNTIME_API=1)
|
|
||||||
|
|
||||||
# Set WAMR_BUILD_TARGET, currently values supported:
|
# Set WAMR_BUILD_TARGET, currently values supported:
|
||||||
# "X86_64", "AMD_64", "X86_32", "AARCH64[sub]", "ARM[sub]", "THUMB[sub]", "MIPS", "XTENSA"
|
# "X86_64", "AMD_64", "X86_32", "AARCH64[sub]", "ARM[sub]", "THUMB[sub]", "MIPS", "XTENSA"
|
||||||
if (NOT DEFINED WAMR_BUILD_TARGET)
|
if (NOT DEFINED WAMR_BUILD_TARGET)
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
#include "wasm_export.h"
|
#include "wasm_export.h"
|
||||||
#include "bh_read_file.h"
|
#include "bh_read_file.h"
|
||||||
|
#include "bh_getopt.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
my_log(uint32 log_level, const char *file, int line, const char *fmt, ...)
|
my_log(uint32 log_level, const char *file, int line, const char *fmt, ...)
|
||||||
|
|
|
@ -18,7 +18,6 @@ if (NOT WAMR_BUILD_PLATFORM STREQUAL "windows")
|
||||||
else()
|
else()
|
||||||
project (aot-compiler C ASM CXX)
|
project (aot-compiler C ASM CXX)
|
||||||
enable_language (ASM_MASM)
|
enable_language (ASM_MASM)
|
||||||
add_definitions(-DCOMPILING_WASM_RUNTIME_API=1)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set (CMAKE_CXX_STANDARD 17)
|
set (CMAKE_CXX_STANDARD 17)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user