Merge main into dev/socket

This commit is contained in:
Wenyong Huang
2022-09-10 22:12:43 +08:00
74 changed files with 1478 additions and 646 deletions

View File

@ -77,6 +77,10 @@ cmake -DWAMR_BUILD_PLATFORM=linux -DWAMR_BUILD_TARGET=ARM
- **WAMR_BUILD_LIB_PTHREAD**=1/0, default to disable if not set
> Note: The dependent feature of lib pthread such as the `shared memory` and `thread manager` will be enabled automatically.
#### **Enable lib-pthread-semaphore**
- **WAMR_BUILD_LIB_PTHREAD_SEMAPHORE**=1/0, default to disable if not set
> Note: This feature depends on `lib-pthread`, it will be enabled automatically if this feature is enabled.
#### **Disable boundary check with hardware trap in AOT or JIT mode**
- **WAMR_DISABLE_HW_BOUND_CHECK**=1/0, default to enable if not set and supported by platform
> Note: by default only platform linux/darwin/android/vxworks 64-bit will enable boundary check with hardware trap in AOT or JIT mode, and the wamrc tool will generate AOT code without boundary check instructions in all 64-bit targets except SGX to improve performance.

View File

@ -160,10 +160,9 @@ Firstly if libc-builtin (-nostdlib) mode meets the requirements, e.g. there are
Most of the above methods are also available for libc-wasi mode, besides them, we can export malloc and free functions with `-Wl,--export=malloc -Wl,--export=free` option, so WAMR runtime will disable its app heap and call the malloc/free function exported to allocate/free the memory from/to the heap space managed by libc.
Note: wasm-ld from LLVM 13 and later automatically inserts dtor calls
for exported funtions. It breaks the malloc/free export mentioned above.
A workaround: Add `-Wl,--export=__wasm_call_ctors`, which happens to
prevent the automatic insertions for the current implementation.
Note: wasm-ld from LLVM 13 and later automatically inserts ctor/dtor calls
for all exported functions for a command. (vs reactor)
It breaks the malloc/free exports mentioned above.
## 3. Build wasm app with pthread support