Fix compile warnings on windows platform: dll linkage and others (#604)
This commit is contained in:
@ -15,6 +15,8 @@ set (CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
|
||||
|
||||
set (CMAKE_C_STANDARD 99)
|
||||
|
||||
add_definitions(-DCOMPILING_WASM_RUNTIME_API=1)
|
||||
|
||||
# Set WAMR_BUILD_TARGET, currently values supported:
|
||||
# "X86_64", "AMD_64", "X86_32", "AARCH64[sub]", "ARM[sub]", "THUMB[sub]", "MIPS", "XTENSA"
|
||||
if (NOT DEFINED WAMR_BUILD_TARGET)
|
||||
@ -126,4 +128,3 @@ set_target_properties (libiwasm PROPERTIES OUTPUT_NAME iwasm)
|
||||
|
||||
target_link_libraries (libiwasm ${LLVM_AVAILABLE_LIBS} ${UV_A_LIBS})
|
||||
|
||||
target_compile_definitions(libiwasm PRIVATE COMPILING_WASM_RUNTIME_API=1)
|
||||
|
||||
@ -185,8 +185,8 @@ module_reader_callback(const char *module_name, uint8 **p_buffer,
|
||||
uint32 *p_size)
|
||||
{
|
||||
const char *format = "%s/%s.wasm";
|
||||
int sz = strlen(module_search_path) + strlen("/") + strlen(module_name) +
|
||||
strlen(".wasm") + 1;
|
||||
uint32 sz = (uint32)(strlen(module_search_path) + strlen("/")
|
||||
+ strlen(module_name) + strlen(".wasm") + 1);
|
||||
char *wasm_file_name = BH_MALLOC(sz);
|
||||
if (!wasm_file_name) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user