Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
|
|
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
|
|
|
|
string(TOUPPER ${WAMR_BUILD_TARGET} WAMR_BUILD_TARGET)
|
|
|
|
|
|
|
|
# Add definitions for the build target
|
|
|
|
if (WAMR_BUILD_TARGET STREQUAL "X86_64")
|
|
|
|
add_definitions(-DBUILD_TARGET_X86_64)
|
|
|
|
elseif (WAMR_BUILD_TARGET STREQUAL "AMD_64")
|
|
|
|
add_definitions(-DBUILD_TARGET_AMD_64)
|
|
|
|
elseif (WAMR_BUILD_TARGET STREQUAL "X86_32")
|
|
|
|
add_definitions(-DBUILD_TARGET_X86_32)
|
|
|
|
elseif (WAMR_BUILD_TARGET MATCHES "ARM.*")
|
|
|
|
if (WAMR_BUILD_TARGET MATCHES "(ARM.*)_VFP")
|
|
|
|
add_definitions(-DBUILD_TARGET_ARM_VFP)
|
|
|
|
add_definitions(-DBUILD_TARGET="${CMAKE_MATCH_1}")
|
|
|
|
else ()
|
|
|
|
add_definitions(-DBUILD_TARGET_ARM)
|
|
|
|
add_definitions(-DBUILD_TARGET="${WAMR_BUILD_TARGET}")
|
|
|
|
endif ()
|
|
|
|
elseif (WAMR_BUILD_TARGET MATCHES "THUMB.*")
|
|
|
|
if (WAMR_BUILD_TARGET MATCHES "(THUMB.*)_VFP")
|
|
|
|
add_definitions(-DBUILD_TARGET_THUMB_VFP)
|
|
|
|
add_definitions(-DBUILD_TARGET="${CMAKE_MATCH_1}")
|
|
|
|
else ()
|
|
|
|
add_definitions(-DBUILD_TARGET_THUMB)
|
|
|
|
add_definitions(-DBUILD_TARGET="${WAMR_BUILD_TARGET}")
|
|
|
|
endif ()
|
2020-03-24 11:04:29 +00:00
|
|
|
elseif (WAMR_BUILD_TARGET MATCHES "AARCH64.*")
|
|
|
|
add_definitions(-DBUILD_TARGET_AARCH64)
|
|
|
|
add_definitions(-DBUILD_TARGET="${WAMR_BUILD_TARGET}")
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
elseif (WAMR_BUILD_TARGET STREQUAL "MIPS")
|
|
|
|
add_definitions(-DBUILD_TARGET_MIPS)
|
|
|
|
elseif (WAMR_BUILD_TARGET STREQUAL "XTENSA")
|
|
|
|
add_definitions(-DBUILD_TARGET_XTENSA)
|
2021-01-25 10:41:48 +00:00
|
|
|
elseif (WAMR_BUILD_TARGET STREQUAL "RISCV64" OR WAMR_BUILD_TARGET STREQUAL "RISCV64_LP64D")
|
|
|
|
add_definitions(-DBUILD_TARGET_RISCV64_LP64D)
|
|
|
|
elseif (WAMR_BUILD_TARGET STREQUAL "RISCV64_LP64")
|
|
|
|
add_definitions(-DBUILD_TARGET_RISCV64_LP64)
|
|
|
|
elseif (WAMR_BUILD_TARGET STREQUAL "RISCV32" OR WAMR_BUILD_TARGET STREQUAL "RISCV32_ILP32D")
|
|
|
|
add_definitions(-DBUILD_TARGET_RISCV32_ILP32D)
|
2024-08-15 07:17:42 +00:00
|
|
|
elseif (WAMR_BUILD_TARGET STREQUAL "RISCV32_ILP32F")
|
|
|
|
add_definitions(-DBUILD_TARGET_RISCV32_ILP32F)
|
2021-01-25 10:41:48 +00:00
|
|
|
elseif (WAMR_BUILD_TARGET STREQUAL "RISCV32_ILP32")
|
|
|
|
add_definitions(-DBUILD_TARGET_RISCV32_ILP32)
|
2021-08-12 09:44:39 +00:00
|
|
|
elseif (WAMR_BUILD_TARGET STREQUAL "ARC")
|
|
|
|
add_definitions(-DBUILD_TARGET_ARC)
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
else ()
|
2021-01-25 10:41:48 +00:00
|
|
|
message (FATAL_ERROR "-- WAMR build target isn't set")
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
endif ()
|
|
|
|
|
2020-03-16 08:43:57 +00:00
|
|
|
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
|
|
add_definitions(-DBH_DEBUG=1)
|
|
|
|
endif ()
|
|
|
|
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
2021-07-22 03:16:47 +00:00
|
|
|
if (WAMR_BUILD_TARGET STREQUAL "X86_64" OR WAMR_BUILD_TARGET STREQUAL "AMD_64"
|
|
|
|
OR WAMR_BUILD_TARGET MATCHES "AARCH64.*" OR WAMR_BUILD_TARGET MATCHES "RISCV64.*")
|
2021-04-27 09:18:27 +00:00
|
|
|
if (NOT WAMR_BUILD_PLATFORM STREQUAL "windows")
|
|
|
|
# Add -fPIC flag if build as 64-bit
|
|
|
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
|
2022-12-08 07:39:55 +00:00
|
|
|
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
2021-04-27 09:18:27 +00:00
|
|
|
set (CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS} -fPIC")
|
2022-12-08 07:39:55 +00:00
|
|
|
set (CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS} -fPIC")
|
2021-04-27 09:18:27 +00:00
|
|
|
endif ()
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
else ()
|
2021-12-06 08:40:48 +00:00
|
|
|
include(CheckCCompilerFlag)
|
2021-12-06 11:01:09 +00:00
|
|
|
Check_C_Compiler_Flag(-m32 M32_OK)
|
|
|
|
if (M32_OK OR WAMR_BUILD_TARGET STREQUAL "X86_32")
|
2021-12-06 08:40:48 +00:00
|
|
|
add_definitions (-m32)
|
|
|
|
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -m32")
|
|
|
|
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m32")
|
|
|
|
endif ()
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
endif ()
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (WAMR_BUILD_TARGET MATCHES "ARM.*")
|
2021-01-25 10:41:48 +00:00
|
|
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -marm")
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
elseif (WAMR_BUILD_TARGET MATCHES "THUMB.*")
|
2021-01-25 10:41:48 +00:00
|
|
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mthumb")
|
|
|
|
set (CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wa,-mthumb")
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (NOT WAMR_BUILD_INTERP EQUAL 1)
|
|
|
|
if (NOT WAMR_BUILD_AOT EQUAL 1)
|
|
|
|
message (FATAL_ERROR "-- WAMR Interpreter and AOT must be enabled at least one")
|
|
|
|
endif ()
|
|
|
|
endif ()
|
|
|
|
|
2022-12-19 03:24:46 +00:00
|
|
|
if (WAMR_BUILD_FAST_JIT EQUAL 1)
|
|
|
|
if (NOT WAMR_BUILD_LAZY_JIT EQUAL 0)
|
|
|
|
# Enable Lazy JIT by default
|
|
|
|
set (WAMR_BUILD_LAZY_JIT 1)
|
|
|
|
endif ()
|
|
|
|
endif ()
|
|
|
|
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
if (WAMR_BUILD_JIT EQUAL 1)
|
2022-10-18 02:59:28 +00:00
|
|
|
if (NOT WAMR_BUILD_LAZY_JIT EQUAL 0)
|
|
|
|
# Enable Lazy JIT by default
|
|
|
|
set (WAMR_BUILD_LAZY_JIT 1)
|
|
|
|
endif ()
|
|
|
|
if (NOT DEFINED LLVM_DIR)
|
|
|
|
set (LLVM_SRC_ROOT "${WAMR_ROOT_DIR}/core/deps/llvm")
|
|
|
|
set (LLVM_BUILD_ROOT "${LLVM_SRC_ROOT}/build")
|
|
|
|
if (NOT EXISTS "${LLVM_BUILD_ROOT}")
|
2021-04-30 01:13:29 +00:00
|
|
|
message (FATAL_ERROR "Cannot find LLVM dir: ${LLVM_BUILD_ROOT}")
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
endif ()
|
2022-10-18 02:59:28 +00:00
|
|
|
set (CMAKE_PREFIX_PATH "${LLVM_BUILD_ROOT};${CMAKE_PREFIX_PATH}")
|
|
|
|
set (LLVM_DIR ${LLVM_BUILD_ROOT}/lib/cmake/llvm)
|
|
|
|
endif ()
|
|
|
|
find_package(LLVM REQUIRED CONFIG)
|
|
|
|
include_directories(${LLVM_INCLUDE_DIRS})
|
|
|
|
add_definitions(${LLVM_DEFINITIONS})
|
|
|
|
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
|
|
|
|
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
|
2022-11-14 02:51:18 +00:00
|
|
|
|
|
|
|
# Disable -Wredundant-move when building LLVM JIT
|
|
|
|
include(CheckCXXCompilerFlag)
|
|
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|
|
|
check_cxx_compiler_flag("-Wredundant-move" CXX_SUPPORTS_REDUNDANT_MOVE_FLAG)
|
|
|
|
if (CXX_SUPPORTS_REDUNDANT_MOVE_FLAG)
|
|
|
|
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-redundant-move")
|
|
|
|
endif ()
|
2023-12-04 08:40:54 +00:00
|
|
|
# Enable exporting symbols after llvm-17, or LLVM JIT may run failed
|
|
|
|
# with `llvm_orc_registerEHFrameSectionWrapper` symbol not found error
|
|
|
|
if (${LLVM_PACKAGE_VERSION} VERSION_GREATER_EQUAL "17.0.0")
|
|
|
|
set (CMAKE_ENABLE_EXPORTS 1)
|
|
|
|
endif ()
|
2022-11-14 02:51:18 +00:00
|
|
|
endif ()
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
else ()
|
|
|
|
unset (LLVM_AVAILABLE_LIBS)
|
|
|
|
endif ()
|
|
|
|
|
2023-05-26 01:45:37 +00:00
|
|
|
# Sanitizers
|
|
|
|
|
2024-04-18 04:32:01 +00:00
|
|
|
if (NOT DEFINED WAMR_BUILD_SANITIZER)
|
|
|
|
set(WAMR_BUILD_SANITIZER $ENV{WAMR_BUILD_SANITIZER})
|
|
|
|
endif ()
|
2023-05-26 01:45:37 +00:00
|
|
|
|
|
|
|
if (NOT DEFINED WAMR_BUILD_SANITIZER)
|
|
|
|
set(WAMR_BUILD_SANITIZER "")
|
|
|
|
elseif (WAMR_BUILD_SANITIZER STREQUAL "ubsan")
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize-recover=all -fno-sanitize=alignment" )
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=undefined")
|
|
|
|
elseif (WAMR_BUILD_SANITIZER STREQUAL "asan")
|
|
|
|
if (NOT WAMR_BUILD_JIT EQUAL 1)
|
|
|
|
set (ASAN_OPTIONS "verbosity=2 debug=true ")
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fno-omit-frame-pointer -fsanitize=address -fno-sanitize-recover=all" )
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
|
|
|
|
endif()
|
2024-01-02 07:58:17 +00:00
|
|
|
elseif (WAMR_BUILD_SANITIZER STREQUAL "tsan")
|
2023-05-26 01:45:37 +00:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fno-omit-frame-pointer -fsanitize=thread -fno-sanitize-recover=all" )
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=thread")
|
|
|
|
elseif (NOT (WAMR_BUILD_SANITIZER STREQUAL "") )
|
|
|
|
message(SEND_ERROR "Unsupported sanitizer: ${WAMR_BUILD_SANITIZER}")
|
|
|
|
endif()
|
|
|
|
|
2024-01-02 07:58:17 +00:00
|
|
|
if (WAMR_BUILD_LINUX_PERF EQUAL 1)
|
|
|
|
if (NOT WAMR_BUILD_JIT AND NOT WAMR_BUILD_AOT)
|
|
|
|
message(WARNING "only support perf in aot and llvm-jit")
|
|
|
|
set(WAMR_BUILD_LINUX_PERF 0)
|
|
|
|
endif ()
|
|
|
|
endif ()
|
|
|
|
|
2025-01-12 23:09:04 +00:00
|
|
|
if (NOT DEFINED WAMR_BUILD_SHRUNK_MEMORY)
|
|
|
|
# Enable shrunk memory by default
|
|
|
|
set (WAMR_BUILD_SHRUNK_MEMORY 1)
|
|
|
|
endif ()
|
|
|
|
|
Enable the semantic version mechanism for WAMR (#1374)
Use the semantic versioning (https://semver.org) to replace the current date
versioning system, which is more general and is requested by some developers,
e.g. issue #1357.
There are three parts in the new version string:
- major. Any incompatible modification on ABIs and APIs will lead to an increment
in the value of major, which mainly includes: AOT calling conventions, AOT file
format, wasm_export.h, wasm_c_api.h, and so on.
- minor. It represents new features, including MVP/POST-MVP features, libraries,
WAMR private ones, and so one.
- patch. It represents patches.
The new version will start from 1.0.0. Update the help info and version showing for
iwasm and wamrc.
2022-08-18 11:01:05 +00:00
|
|
|
########################################
|
|
|
|
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
message ("-- Build Configurations:")
|
|
|
|
message (" Build as target ${WAMR_BUILD_TARGET}")
|
|
|
|
message (" CMAKE_BUILD_TYPE " ${CMAKE_BUILD_TYPE})
|
|
|
|
if (WAMR_BUILD_INTERP EQUAL 1)
|
|
|
|
message (" WAMR Interpreter enabled")
|
|
|
|
else ()
|
2020-04-07 03:04:46 +00:00
|
|
|
message (" WAMR Interpreter disabled")
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
endif ()
|
|
|
|
if (WAMR_BUILD_AOT EQUAL 1)
|
|
|
|
message (" WAMR AOT enabled")
|
|
|
|
else ()
|
2020-04-07 03:04:46 +00:00
|
|
|
message (" WAMR AOT disabled")
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
endif ()
|
2022-10-18 02:59:28 +00:00
|
|
|
if (WAMR_BUILD_FAST_JIT EQUAL 1)
|
2022-12-19 03:24:46 +00:00
|
|
|
if (WAMR_BUILD_LAZY_JIT EQUAL 1)
|
|
|
|
add_definitions("-DWASM_ENABLE_LAZY_JIT=1")
|
|
|
|
message (" WAMR Fast JIT enabled with Lazy Compilation")
|
|
|
|
else ()
|
|
|
|
message (" WAMR Fast JIT enabled with Eager Compilation")
|
|
|
|
endif ()
|
2022-10-18 02:59:28 +00:00
|
|
|
else ()
|
|
|
|
message (" WAMR Fast JIT disabled")
|
|
|
|
endif ()
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
if (WAMR_BUILD_JIT EQUAL 1)
|
2022-10-18 12:17:34 +00:00
|
|
|
add_definitions("-DWASM_ENABLE_JIT=1")
|
2021-09-07 03:39:57 +00:00
|
|
|
if (WAMR_BUILD_LAZY_JIT EQUAL 1)
|
2022-10-18 12:17:34 +00:00
|
|
|
add_definitions("-DWASM_ENABLE_LAZY_JIT=1")
|
|
|
|
message (" WAMR LLVM ORC JIT enabled with Lazy Compilation")
|
2021-09-07 03:39:57 +00:00
|
|
|
else ()
|
2022-10-18 12:17:34 +00:00
|
|
|
message (" WAMR LLVM ORC JIT enabled with Eager Compilation")
|
2021-09-07 03:39:57 +00:00
|
|
|
endif ()
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
else ()
|
2022-10-18 12:17:34 +00:00
|
|
|
message (" WAMR LLVM ORC JIT disabled")
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
endif ()
|
2022-12-19 03:24:46 +00:00
|
|
|
if (WAMR_BUILD_FAST_JIT EQUAL 1 AND WAMR_BUILD_JIT EQUAL 1
|
|
|
|
AND WAMR_BUILD_LAZY_JIT EQUAL 1)
|
|
|
|
message (" Multi-tier JIT enabled")
|
|
|
|
endif ()
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
if (WAMR_BUILD_LIBC_BUILTIN EQUAL 1)
|
|
|
|
message (" Libc builtin enabled")
|
|
|
|
else ()
|
2020-04-07 03:04:46 +00:00
|
|
|
message (" Libc builtin disabled")
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
endif ()
|
2021-02-22 06:17:46 +00:00
|
|
|
if (WAMR_BUILD_LIBC_UVWASI EQUAL 1)
|
|
|
|
message (" Libc WASI enabled with uvwasi implementation")
|
|
|
|
elseif (WAMR_BUILD_LIBC_WASI EQUAL 1)
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
message (" Libc WASI enabled")
|
|
|
|
else ()
|
2020-04-07 03:04:46 +00:00
|
|
|
message (" Libc WASI disabled")
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
endif ()
|
2021-10-09 07:56:58 +00:00
|
|
|
if ((WAMR_BUILD_FAST_INTERP EQUAL 1) AND (WAMR_BUILD_INTERP EQUAL 1))
|
2020-03-07 14:20:38 +00:00
|
|
|
add_definitions (-DWASM_ENABLE_FAST_INTERP=1)
|
|
|
|
message (" Fast interpreter enabled")
|
|
|
|
else ()
|
|
|
|
add_definitions (-DWASM_ENABLE_FAST_INTERP=0)
|
2020-04-07 03:04:46 +00:00
|
|
|
message (" Fast interpreter disabled")
|
2020-03-07 14:20:38 +00:00
|
|
|
endif ()
|
2020-06-02 06:53:06 +00:00
|
|
|
if (WAMR_BUILD_MULTI_MODULE EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_MULTI_MODULE=1)
|
|
|
|
message (" Multiple modules enabled")
|
|
|
|
else ()
|
|
|
|
add_definitions (-DWASM_ENABLE_MULTI_MODULE=0)
|
|
|
|
message (" Multiple modules disabled")
|
|
|
|
endif ()
|
2020-04-30 09:52:11 +00:00
|
|
|
if (WAMR_BUILD_SPEC_TEST EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_SPEC_TEST=1)
|
|
|
|
message (" spec test compatible mode is on")
|
2020-06-08 03:19:09 +00:00
|
|
|
endif ()
|
2024-06-25 02:04:39 +00:00
|
|
|
if (WAMR_BUILD_WASI_TEST EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_WASI_TEST=1)
|
|
|
|
message (" wasi test compatible mode is on")
|
|
|
|
endif ()
|
2022-12-05 06:11:19 +00:00
|
|
|
if (NOT DEFINED WAMR_BUILD_BULK_MEMORY)
|
|
|
|
# Enable bulk memory by default
|
|
|
|
set (WAMR_BUILD_BULK_MEMORY 1)
|
|
|
|
endif ()
|
2020-06-02 06:53:06 +00:00
|
|
|
if (WAMR_BUILD_BULK_MEMORY EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_BULK_MEMORY=1)
|
|
|
|
message (" Bulk memory feature enabled")
|
|
|
|
else ()
|
|
|
|
add_definitions (-DWASM_ENABLE_BULK_MEMORY=0)
|
2022-12-05 06:11:19 +00:00
|
|
|
message (" Bulk memory feature disabled")
|
2020-06-08 03:19:09 +00:00
|
|
|
endif ()
|
2020-06-15 11:04:04 +00:00
|
|
|
if (WAMR_BUILD_SHARED_MEMORY EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_SHARED_MEMORY=1)
|
|
|
|
message (" Shared memory enabled")
|
|
|
|
else ()
|
|
|
|
add_definitions (-DWASM_ENABLE_SHARED_MEMORY=0)
|
|
|
|
endif ()
|
2024-09-14 02:51:42 +00:00
|
|
|
if (WAMR_BUILD_SHARED_HEAP EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_SHARED_HEAP=1)
|
|
|
|
message (" Shared heap enabled")
|
|
|
|
endif()
|
|
|
|
|
2024-04-02 07:22:07 +00:00
|
|
|
if (WAMR_BUILD_MEMORY64 EQUAL 1)
|
|
|
|
# if native is 32-bit or cross-compiled to 32-bit
|
|
|
|
if (NOT WAMR_BUILD_TARGET MATCHES ".*64.*")
|
|
|
|
message (FATAL_ERROR "-- Memory64 is only available on the 64-bit platform/target")
|
|
|
|
endif()
|
|
|
|
add_definitions (-DWASM_ENABLE_MEMORY64=1)
|
|
|
|
set (WAMR_DISABLE_HW_BOUND_CHECK 1)
|
|
|
|
message (" Memory64 memory enabled")
|
|
|
|
endif ()
|
2024-08-21 04:22:23 +00:00
|
|
|
if (WAMR_BUILD_MULTI_MEMORY EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_MULTI_MEMORY=1)
|
|
|
|
message (" Multi memory enabled")
|
|
|
|
set (WAMR_BUILD_DEBUG_INTERP 0)
|
|
|
|
endif ()
|
2020-06-15 11:04:04 +00:00
|
|
|
if (WAMR_BUILD_THREAD_MGR EQUAL 1)
|
|
|
|
message (" Thread manager enabled")
|
|
|
|
endif ()
|
|
|
|
if (WAMR_BUILD_LIB_PTHREAD EQUAL 1)
|
|
|
|
message (" Lib pthread enabled")
|
|
|
|
endif ()
|
2022-08-08 11:59:46 +00:00
|
|
|
if (WAMR_BUILD_LIB_PTHREAD_SEMAPHORE EQUAL 1)
|
|
|
|
message (" Lib pthread semaphore enabled")
|
|
|
|
endif ()
|
2023-03-14 23:47:36 +00:00
|
|
|
if (WAMR_BUILD_LIB_WASI_THREADS EQUAL 1)
|
|
|
|
message (" Lib wasi-threads enabled")
|
|
|
|
endif ()
|
2020-10-22 08:18:37 +00:00
|
|
|
if (WAMR_BUILD_LIBC_EMCC EQUAL 1)
|
|
|
|
message (" Libc emcc enabled")
|
|
|
|
endif ()
|
2022-09-06 06:29:58 +00:00
|
|
|
if (WAMR_BUILD_LIB_RATS EQUAL 1)
|
|
|
|
message (" Lib rats enabled")
|
|
|
|
endif()
|
2020-06-08 03:19:09 +00:00
|
|
|
if (WAMR_BUILD_MINI_LOADER EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_MINI_LOADER=1)
|
|
|
|
message (" WASM mini loader enabled")
|
|
|
|
else ()
|
|
|
|
add_definitions (-DWASM_ENABLE_MINI_LOADER=0)
|
|
|
|
endif ()
|
2020-06-28 07:41:25 +00:00
|
|
|
if (WAMR_DISABLE_HW_BOUND_CHECK EQUAL 1)
|
|
|
|
add_definitions (-DWASM_DISABLE_HW_BOUND_CHECK=1)
|
2022-11-07 10:26:33 +00:00
|
|
|
add_definitions (-DWASM_DISABLE_STACK_HW_BOUND_CHECK=1)
|
2020-06-28 07:41:25 +00:00
|
|
|
message (" Hardware boundary check disabled")
|
2021-05-19 06:57:31 +00:00
|
|
|
else ()
|
|
|
|
add_definitions (-DWASM_DISABLE_HW_BOUND_CHECK=0)
|
2022-11-07 10:26:33 +00:00
|
|
|
if (WAMR_DISABLE_STACK_HW_BOUND_CHECK EQUAL 1)
|
|
|
|
add_definitions (-DWASM_DISABLE_STACK_HW_BOUND_CHECK=1)
|
|
|
|
message (" Hardware boundary check for native stack disabled")
|
|
|
|
else ()
|
|
|
|
add_definitions (-DWASM_DISABLE_STACK_HW_BOUND_CHECK=0)
|
|
|
|
endif ()
|
2020-06-28 07:41:25 +00:00
|
|
|
endif ()
|
2023-09-20 10:11:52 +00:00
|
|
|
if (WAMR_DISABLE_WAKEUP_BLOCKING_OP EQUAL 1)
|
|
|
|
add_definitions (-DWASM_DISABLE_WAKEUP_BLOCKING_OP=1)
|
|
|
|
message (" Wakeup of blocking operations disabled")
|
|
|
|
else ()
|
|
|
|
add_definitions (-DWASM_DISABLE_WAKEUP_BLOCKING_OP=0)
|
|
|
|
message (" Wakeup of blocking operations enabled")
|
|
|
|
endif ()
|
2020-11-05 10:15:15 +00:00
|
|
|
if (WAMR_BUILD_SIMD EQUAL 1)
|
2021-07-22 03:16:47 +00:00
|
|
|
if (NOT WAMR_BUILD_TARGET MATCHES "RISCV64.*")
|
|
|
|
add_definitions (-DWASM_ENABLE_SIMD=1)
|
|
|
|
message (" SIMD enabled")
|
|
|
|
else ()
|
|
|
|
message (" SIMD disabled due to not supported on target RISCV64")
|
|
|
|
endif ()
|
2020-11-05 10:15:15 +00:00
|
|
|
endif ()
|
2024-02-06 12:47:11 +00:00
|
|
|
if (WAMR_BUILD_AOT_STACK_FRAME EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_AOT_STACK_FRAME=1)
|
|
|
|
message (" AOT stack frame enabled")
|
|
|
|
endif ()
|
2020-09-18 10:04:56 +00:00
|
|
|
if (WAMR_BUILD_MEMORY_PROFILING EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_MEMORY_PROFILING=1)
|
|
|
|
message (" Memory profiling enabled")
|
|
|
|
endif ()
|
2021-01-18 05:23:10 +00:00
|
|
|
if (WAMR_BUILD_PERF_PROFILING EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_PERF_PROFILING=1)
|
|
|
|
message (" Performance profiling enabled")
|
|
|
|
endif ()
|
2020-08-11 06:47:24 +00:00
|
|
|
if (DEFINED WAMR_APP_THREAD_STACK_SIZE_MAX)
|
|
|
|
add_definitions (-DAPP_THREAD_STACK_SIZE_MAX=${WAMR_APP_THREAD_STACK_SIZE_MAX})
|
|
|
|
endif ()
|
2020-09-23 08:12:09 +00:00
|
|
|
if (WAMR_BUILD_CUSTOM_NAME_SECTION EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_CUSTOM_NAME_SECTION=1)
|
|
|
|
message (" Custom name section enabled")
|
|
|
|
endif ()
|
2021-01-18 05:23:10 +00:00
|
|
|
if (WAMR_BUILD_DUMP_CALL_STACK EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_DUMP_CALL_STACK=1)
|
|
|
|
message (" Dump call stack enabled")
|
|
|
|
endif ()
|
2020-09-24 04:38:54 +00:00
|
|
|
if (WAMR_BUILD_TAIL_CALL EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_TAIL_CALL=1)
|
|
|
|
message (" Tail call enabled")
|
|
|
|
endif ()
|
2021-04-15 03:29:20 +00:00
|
|
|
if (WAMR_BUILD_REF_TYPES EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_REF_TYPES=1)
|
|
|
|
message (" Reference types enabled")
|
|
|
|
else ()
|
|
|
|
message (" Reference types disabled")
|
|
|
|
endif ()
|
2024-02-06 12:47:11 +00:00
|
|
|
if (WAMR_BUILD_GC EQUAL 1)
|
|
|
|
message (" GC enabled")
|
|
|
|
if (WAMR_TEST_GC EQUAL 1)
|
|
|
|
message(" GC testing enabled")
|
|
|
|
endif()
|
|
|
|
endif ()
|
|
|
|
if (WAMR_BUILD_GC EQUAL 1 AND WAMR_BUILD_GC_PERF_PROFILING EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_GC_PERF_PROFILING=1)
|
|
|
|
message (" GC performance profiling enabled")
|
|
|
|
else ()
|
|
|
|
message (" GC performance profiling disabled")
|
|
|
|
endif ()
|
|
|
|
if (WAMR_BUILD_STRINGREF EQUAL 1)
|
|
|
|
message (" Stringref enabled")
|
|
|
|
if (NOT DEFINED WAMR_STRINGREF_IMPL_SOURCE)
|
|
|
|
message (" Using WAMR builtin implementation for stringref")
|
|
|
|
else ()
|
|
|
|
message (" Using custom implementation for stringref")
|
|
|
|
endif()
|
|
|
|
endif ()
|
|
|
|
if (WAMR_BUILD_PERF_PROFILING EQUAL 1 OR
|
|
|
|
WAMR_BUILD_DUMP_CALL_STACK EQUAL 1 OR
|
|
|
|
WAMR_BUILD_GC EQUAL 1)
|
|
|
|
# Enable AOT/JIT stack frame when perf-profiling, dump-call-stack
|
|
|
|
# or GC is enabled
|
|
|
|
if (WAMR_BUILD_AOT EQUAL 1 OR WAMR_BUILD_JIT EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_AOT_STACK_FRAME=1)
|
|
|
|
endif ()
|
|
|
|
endif ()
|
2024-01-31 00:27:17 +00:00
|
|
|
if (WAMR_BUILD_EXCE_HANDLING EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_EXCE_HANDLING=1)
|
|
|
|
add_definitions (-DWASM_ENABLE_TAGS=1)
|
|
|
|
message (" Exception Handling enabled")
|
|
|
|
endif ()
|
2021-03-06 14:29:58 +00:00
|
|
|
if (DEFINED WAMR_BH_VPRINTF)
|
2021-05-26 05:22:03 +00:00
|
|
|
add_definitions (-DBH_VPRINTF=${WAMR_BH_VPRINTF})
|
|
|
|
endif ()
|
2024-01-24 05:05:07 +00:00
|
|
|
if (DEFINED WAMR_BH_LOG)
|
|
|
|
add_definitions (-DBH_LOG=${WAMR_BH_LOG})
|
|
|
|
endif ()
|
2021-05-26 05:22:03 +00:00
|
|
|
if (WAMR_DISABLE_APP_ENTRY EQUAL 1)
|
|
|
|
message (" WAMR application entry functions excluded")
|
2021-03-06 14:29:58 +00:00
|
|
|
endif ()
|
2021-09-29 05:36:46 +00:00
|
|
|
if (WAMR_BUILD_DEBUG_INTERP EQUAL 1)
|
|
|
|
message (" Debug Interpreter enabled")
|
|
|
|
endif ()
|
|
|
|
if (WAMR_BUILD_DEBUG_AOT EQUAL 1)
|
|
|
|
message (" Debug AOT enabled")
|
|
|
|
endif ()
|
2024-09-18 03:02:10 +00:00
|
|
|
if (WAMR_BUILD_DYNAMIC_AOT_DEBUG EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_DYNAMIC_AOT_DEBUG=1)
|
|
|
|
message (" Dynamic AOT debug enabled")
|
|
|
|
endif ()
|
2022-06-10 13:51:13 +00:00
|
|
|
if (WAMR_BUILD_LOAD_CUSTOM_SECTION EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_LOAD_CUSTOM_SECTION=1)
|
|
|
|
message (" Load custom section enabled")
|
|
|
|
endif ()
|
2022-10-25 13:36:24 +00:00
|
|
|
if (WAMR_BUILD_GLOBAL_HEAP_POOL EQUAL 1)
|
|
|
|
add_definitions(-DWASM_ENABLE_GLOBAL_HEAP_POOL=1)
|
|
|
|
message (" Global heap pool enabled")
|
|
|
|
endif ()
|
|
|
|
if (WAMR_BUILD_GLOBAL_HEAP_SIZE GREATER 0)
|
|
|
|
add_definitions (-DWASM_GLOBAL_HEAP_SIZE=${WAMR_BUILD_GLOBAL_HEAP_SIZE})
|
|
|
|
message (" Custom global heap size: " ${WAMR_BUILD_GLOBAL_HEAP_SIZE})
|
|
|
|
else ()
|
|
|
|
# Spec test requires more heap pool size
|
|
|
|
if (WAMR_BUILD_SPEC_TEST EQUAL 1)
|
|
|
|
if (WAMR_BUILD_PLATFORM STREQUAL "linux-sgx")
|
|
|
|
math(EXPR WAMR_BUILD_GLOBAL_HEAP_SIZE "100 * 1024 * 1024")
|
|
|
|
else ()
|
|
|
|
math(EXPR WAMR_BUILD_GLOBAL_HEAP_SIZE "300 * 1024 * 1024")
|
|
|
|
endif ()
|
|
|
|
add_definitions (-DWASM_GLOBAL_HEAP_SIZE=${WAMR_BUILD_GLOBAL_HEAP_SIZE})
|
|
|
|
else ()
|
|
|
|
# By default, the global heap size is of 10 MB
|
|
|
|
math(EXPR WAMR_BUILD_GLOBAL_HEAP_SIZE "10 * 1024 * 1024")
|
|
|
|
add_definitions (-DWASM_GLOBAL_HEAP_SIZE=${WAMR_BUILD_GLOBAL_HEAP_SIZE})
|
|
|
|
endif ()
|
|
|
|
endif ()
|
2022-08-12 02:17:11 +00:00
|
|
|
if (WAMR_BUILD_STACK_GUARD_SIZE GREATER 0)
|
|
|
|
add_definitions (-DWASM_STACK_GUARD_SIZE=${WAMR_BUILD_STACK_GUARD_SIZE})
|
|
|
|
message (" Custom stack guard size: " ${WAMR_BUILD_STACK_GUARD_SIZE})
|
|
|
|
endif ()
|
2022-09-28 05:09:58 +00:00
|
|
|
if (WAMR_BUILD_SGX_IPFS EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_SGX_IPFS=1)
|
|
|
|
message (" SGX IPFS enabled")
|
|
|
|
endif ()
|
2022-10-12 04:09:29 +00:00
|
|
|
if (WAMR_BUILD_WASI_NN EQUAL 1)
|
|
|
|
message (" WASI-NN enabled")
|
2023-03-08 07:54:06 +00:00
|
|
|
add_definitions (-DWASM_ENABLE_WASI_NN=1)
|
2024-07-22 09:16:41 +00:00
|
|
|
# Variant backends
|
2024-09-10 00:45:18 +00:00
|
|
|
if (NOT WAMR_BUILD_WASI_NN_TFLITE EQUAL 1 AND
|
|
|
|
NOT WAMR_BUILD_WASI_NN_OPENVINO EQUAL 1 AND
|
|
|
|
NOT WAMR_BUILD_WASI_NN_LLAMACPP EQUAL 1)
|
2024-07-22 09:16:41 +00:00
|
|
|
message (FATAL_ERROR " Need to select a backend for WASI-NN")
|
|
|
|
endif ()
|
2024-08-13 01:14:52 +00:00
|
|
|
|
2024-07-22 09:16:41 +00:00
|
|
|
if (WAMR_BUILD_WASI_NN_TFLITE EQUAL 1)
|
2024-08-13 01:14:52 +00:00
|
|
|
message (" WASI-NN: backend tflite enabled")
|
2024-07-22 09:16:41 +00:00
|
|
|
add_definitions (-DWASM_ENABLE_WASI_NN_TFLITE)
|
|
|
|
endif ()
|
|
|
|
if (WAMR_BUILD_WASI_NN_OPENVINO EQUAL 1)
|
2024-08-13 01:14:52 +00:00
|
|
|
message (" WASI-NN: backend openvino enabled")
|
2024-07-22 09:16:41 +00:00
|
|
|
add_definitions (-DWASM_ENABLE_WASI_NN_OPENVINO)
|
|
|
|
endif ()
|
2024-09-10 00:45:18 +00:00
|
|
|
if (WAMR_BUILD_WASI_NN_LLAMACPP EQUAL 1)
|
|
|
|
message (" WASI-NN: backend llamacpp enabled")
|
|
|
|
add_definitions (-DWASM_ENABLE_WASI_NN_LLAMACPP)
|
|
|
|
endif ()
|
2024-07-22 09:16:41 +00:00
|
|
|
# Variant devices
|
2023-08-14 12:03:56 +00:00
|
|
|
if (WAMR_BUILD_WASI_NN_ENABLE_GPU EQUAL 1)
|
2023-03-08 07:54:06 +00:00
|
|
|
message (" WASI-NN: GPU enabled")
|
2023-08-14 12:03:56 +00:00
|
|
|
add_definitions (-DWASM_ENABLE_WASI_NN_GPU=1)
|
2023-03-08 07:54:06 +00:00
|
|
|
endif ()
|
2023-08-14 12:03:56 +00:00
|
|
|
if (WAMR_BUILD_WASI_NN_ENABLE_EXTERNAL_DELEGATE EQUAL 1)
|
2023-05-05 08:29:36 +00:00
|
|
|
message (" WASI-NN: External Delegation enabled")
|
2023-08-14 12:03:56 +00:00
|
|
|
add_definitions (-DWASM_ENABLE_WASI_NN_EXTERNAL_DELEGATE=1)
|
2023-05-05 08:29:36 +00:00
|
|
|
endif ()
|
2023-08-14 12:03:56 +00:00
|
|
|
if (DEFINED WAMR_BUILD_WASI_NN_EXTERNAL_DELEGATE_PATH)
|
|
|
|
add_definitions (-DWASM_WASI_NN_EXTERNAL_DELEGATE_PATH="${WAMR_BUILD_WASI_NN_EXTERNAL_DELEGATE_PATH}")
|
2023-05-05 08:29:36 +00:00
|
|
|
endif ()
|
2024-03-21 13:05:34 +00:00
|
|
|
if (WAMR_BUILD_WASI_EPHEMERAL_NN EQUAL 1)
|
2024-08-13 01:14:52 +00:00
|
|
|
message (" WASI-NN: use 'wasi_ephemeral_nn' instead of 'wasi-nn'")
|
2024-03-21 13:05:34 +00:00
|
|
|
add_definitions (-DWASM_ENABLE_WASI_EPHEMERAL_NN=1)
|
|
|
|
endif()
|
2022-10-12 04:09:29 +00:00
|
|
|
endif ()
|
2022-11-30 08:19:18 +00:00
|
|
|
if (WAMR_BUILD_ALLOC_WITH_USER_DATA EQUAL 1)
|
|
|
|
add_definitions(-DWASM_MEM_ALLOC_WITH_USER_DATA=1)
|
|
|
|
endif()
|
2022-12-05 04:25:26 +00:00
|
|
|
if (WAMR_BUILD_WASM_CACHE EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_WASM_CACHE=1)
|
|
|
|
message (" Wasm files cache enabled")
|
|
|
|
endif ()
|
2023-09-07 06:54:11 +00:00
|
|
|
if (WAMR_BUILD_MODULE_INST_CONTEXT EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_MODULE_INST_CONTEXT=1)
|
|
|
|
message (" Module instance context enabled")
|
|
|
|
endif ()
|
2023-02-28 09:38:18 +00:00
|
|
|
if (WAMR_BUILD_GC_HEAP_VERIFY EQUAL 1)
|
2024-09-20 08:13:20 +00:00
|
|
|
add_definitions (-DBH_ENABLE_GC_VERIFY=1)
|
2023-02-28 09:38:18 +00:00
|
|
|
message (" GC heap verification enabled")
|
|
|
|
endif ()
|
|
|
|
if ("$ENV{COLLECT_CODE_COVERAGE}" STREQUAL "1" OR COLLECT_CODE_COVERAGE EQUAL 1)
|
|
|
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage")
|
|
|
|
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
|
2023-03-07 00:45:03 +00:00
|
|
|
add_definitions (-DCOLLECT_CODE_COVERAGE)
|
2023-02-28 09:38:18 +00:00
|
|
|
message (" Collect code coverage enabled")
|
|
|
|
endif ()
|
2023-06-05 01:17:39 +00:00
|
|
|
if (WAMR_BUILD_STATIC_PGO EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_STATIC_PGO=1)
|
|
|
|
message (" AOT static PGO enabled")
|
|
|
|
endif ()
|
2024-01-23 04:21:20 +00:00
|
|
|
if (WAMR_BUILD_TARGET STREQUAL "X86_64"
|
|
|
|
AND WAMR_BUILD_PLATFORM STREQUAL "linux")
|
|
|
|
if (WAMR_DISABLE_WRITE_GS_BASE EQUAL 1)
|
|
|
|
# disabled by user
|
|
|
|
set (DISABLE_WRITE_GS_BASE 1)
|
|
|
|
elseif (WAMR_DISABLE_WRITE_GS_BASE EQUAL 0)
|
|
|
|
# enabled by user
|
|
|
|
set (DISABLE_WRITE_GS_BASE 0)
|
|
|
|
elseif (CMAKE_CROSSCOMPILING)
|
|
|
|
# disabled in cross compilation environment
|
|
|
|
set (DISABLE_WRITE_GS_BASE 1)
|
|
|
|
else ()
|
|
|
|
# auto-detected by the compiler
|
|
|
|
set (TEST_WRGSBASE_SOURCE "${CMAKE_BINARY_DIR}/test_wrgsbase.c")
|
|
|
|
file (WRITE "${TEST_WRGSBASE_SOURCE}" "
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
int main() {
|
|
|
|
uint64_t value;
|
|
|
|
asm volatile (\"wrgsbase %0\" : : \"r\"(value));
|
|
|
|
printf(\"WRGSBASE instruction is available.\\n\");
|
|
|
|
return 0;
|
|
|
|
}")
|
|
|
|
# Try to compile and run the test program
|
|
|
|
try_run (TEST_WRGSBASE_RESULT
|
|
|
|
TEST_WRGSBASE_COMPILED
|
|
|
|
${CMAKE_BINARY_DIR}/test_wrgsbase
|
|
|
|
SOURCES ${TEST_WRGSBASE_SOURCE}
|
|
|
|
CMAKE_FLAGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
|
|
|
)
|
|
|
|
#message("${TEST_WRGSBASE_COMPILED}, ${TEST_WRGSBASE_RESULT}")
|
|
|
|
if (TEST_WRGSBASE_RESULT EQUAL 0)
|
|
|
|
set (DISABLE_WRITE_GS_BASE 0)
|
|
|
|
else ()
|
|
|
|
set (DISABLE_WRITE_GS_BASE 1)
|
|
|
|
endif ()
|
|
|
|
endif ()
|
|
|
|
if (DISABLE_WRITE_GS_BASE EQUAL 1)
|
2023-08-09 11:43:08 +00:00
|
|
|
add_definitions (-DWASM_DISABLE_WRITE_GS_BASE=1)
|
|
|
|
message (" Write linear memory base addr to x86 GS register disabled")
|
2024-01-23 04:21:20 +00:00
|
|
|
else ()
|
|
|
|
add_definitions (-DWASM_DISABLE_WRITE_GS_BASE=0)
|
|
|
|
message (" Write linear memory base addr to x86 GS register enabled")
|
2023-08-09 11:43:08 +00:00
|
|
|
endif ()
|
2023-06-13 02:26:25 +00:00
|
|
|
endif ()
|
2024-05-14 06:33:09 +00:00
|
|
|
if (WAMR_CONFIGURABLE_BOUNDS_CHECKS EQUAL 1)
|
2023-07-04 08:21:30 +00:00
|
|
|
add_definitions (-DWASM_CONFIGURABLE_BOUNDS_CHECKS=1)
|
|
|
|
message (" Configurable bounds checks enabled")
|
|
|
|
endif ()
|
2024-01-02 07:58:17 +00:00
|
|
|
if (WAMR_BUILD_LINUX_PERF EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_LINUX_PERF=1)
|
2024-01-10 08:44:09 +00:00
|
|
|
message (" Linux perf support enabled")
|
|
|
|
endif ()
|
2024-01-17 08:17:08 +00:00
|
|
|
if (WAMR_BUILD_AOT EQUAL 1 OR WAMR_BUILD_JIT EQUAL 1)
|
|
|
|
if (NOT DEFINED WAMR_BUILD_QUICK_AOT_ENTRY)
|
|
|
|
# Enable quick aot/jit entries by default
|
|
|
|
set (WAMR_BUILD_QUICK_AOT_ENTRY 1)
|
|
|
|
endif ()
|
|
|
|
if (WAMR_BUILD_QUICK_AOT_ENTRY EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_QUICK_AOT_ENTRY=1)
|
|
|
|
message (" Quick AOT/JIT entries enabled")
|
|
|
|
else ()
|
|
|
|
add_definitions (-DWASM_ENABLE_QUICK_AOT_ENTRY=0)
|
|
|
|
message (" Quick AOT/JIT entries disabled")
|
|
|
|
endif ()
|
2024-01-10 08:44:09 +00:00
|
|
|
else ()
|
2024-01-17 08:17:08 +00:00
|
|
|
# Disable quick aot/jit entries for interp and fast-jit
|
2024-01-10 08:44:09 +00:00
|
|
|
add_definitions (-DWASM_ENABLE_QUICK_AOT_ENTRY=0)
|
2024-01-02 07:58:17 +00:00
|
|
|
endif ()
|
2024-04-01 03:26:05 +00:00
|
|
|
if (WAMR_BUILD_AOT EQUAL 1)
|
|
|
|
if (NOT DEFINED WAMR_BUILD_AOT_INTRINSICS)
|
|
|
|
# Enable aot intrinsics by default
|
|
|
|
set (WAMR_BUILD_AOT_INTRINSICS 1)
|
|
|
|
endif ()
|
|
|
|
if (WAMR_BUILD_AOT_INTRINSICS EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_AOT_INTRINSICS=1)
|
|
|
|
message (" AOT intrinsics enabled")
|
|
|
|
else ()
|
|
|
|
add_definitions (-DWASM_ENABLE_AOT_INTRINSICS=0)
|
|
|
|
message (" AOT intrinsics disabled")
|
|
|
|
endif ()
|
|
|
|
else ()
|
|
|
|
# Disable aot intrinsics for interp, fast-jit and llvm-jit
|
|
|
|
add_definitions (-DWASM_ENABLE_AOT_INTRINSICS=0)
|
|
|
|
endif ()
|
2024-04-18 11:40:57 +00:00
|
|
|
if (WAMR_BUILD_ALLOC_WITH_USAGE EQUAL 1)
|
|
|
|
add_definitions(-DWASM_MEM_ALLOC_WITH_USAGE=1)
|
|
|
|
endif()
|
2024-04-18 04:32:01 +00:00
|
|
|
if (NOT WAMR_BUILD_SANITIZER STREQUAL "")
|
|
|
|
message (" Sanitizer ${WAMR_BUILD_SANITIZER} enabled")
|
|
|
|
endif ()
|
2025-01-12 23:09:04 +00:00
|
|
|
if (WAMR_BUILD_SHRUNK_MEMORY EQUAL 1)
|
|
|
|
add_definitions (-DWASM_ENABLE_SHRUNK_MEMORY=1)
|
|
|
|
message (" Shrunk memory enabled")
|
|
|
|
else ()
|
|
|
|
add_definitions (-DWASM_ENABLE_SHRUNK_MEMORY=0)
|
|
|
|
message (" Shrunk memory disabled")
|
|
|
|
endif ()
|