mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-11 20:21:11 +00:00
Compare commits
15 Commits
cdf7ef30d6
...
a2c55b1410
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a2c55b1410 | ||
![]() |
10e7fb7012 | ||
![]() |
0860d7fda6 | ||
![]() |
0df6dc42af | ||
![]() |
26c35cbb6c | ||
![]() |
db6ea1d0f4 | ||
![]() |
14be14f337 | ||
![]() |
0c9dd5a346 | ||
![]() |
4d73ab0bbc | ||
![]() |
b8bd1ef274 | ||
![]() |
766145a166 | ||
![]() |
3f3a214411 | ||
![]() |
0e8b57d8a8 | ||
![]() |
88b5f6a535 | ||
![]() |
ac2fe552d5 |
62
.github/workflows/compilation_on_macos.yml
vendored
62
.github/workflows/compilation_on_macos.yml
vendored
|
@ -46,11 +46,14 @@ concurrency:
|
|||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
AOT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
|
||||
CLASSIC_INTERP_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=0 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
|
||||
FAST_INTERP_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=0 -DWAMR_BUILD_FAST_INTERP=1 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
|
||||
LLVM_LAZY_JIT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=1"
|
||||
LLVM_EAGER_JIT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=0"
|
||||
# For BUILD
|
||||
AOT_BUILD_OPTIONS: " -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_FAST_JIT=0 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
|
||||
CLASSIC_INTERP_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=0 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_JIT=0 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
|
||||
FAST_INTERP_BUILD_OPTIONS: " -DWAMR_BUILD_AOT=0 -DWAMR_BUILD_FAST_INTERP=1 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_JIT=0 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
|
||||
FAST_JIT_BUILD_OPTIONS: " -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_FAST_JIT=1 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
|
||||
LLVM_LAZY_JIT_BUILD_OPTIONS: " -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_FAST_JIT=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=1"
|
||||
LLVM_EAGER_JIT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_FAST_JIT=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=0"
|
||||
MULTI_TIER_JIT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_JIT=1 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=1"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
@ -214,33 +217,68 @@ jobs:
|
|||
working-directory: product-mini/platforms/${{ matrix.platform }}
|
||||
|
||||
build_samples_wasm_c_api:
|
||||
needs: [build_iwasm]
|
||||
needs:
|
||||
[
|
||||
build_iwasm,
|
||||
build_llvm_libraries_on_intel_macos,
|
||||
build_wamrc,
|
||||
]
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
make_options: [
|
||||
# Running modes supported
|
||||
$AOT_BUILD_OPTIONS,
|
||||
$CLASSIC_INTERP_BUILD_OPTIONS,
|
||||
$FAST_INTERP_BUILD_OPTIONS,
|
||||
# Running modes unsupported
|
||||
#$LLVM_LAZY_JIT_BUILD_OPTIONS,
|
||||
#$LLVM_EAGER_JIT_BUILD_OPTIONS,
|
||||
#$AOT_BUILD_OPTIONS,
|
||||
$FAST_JIT_BUILD_OPTIONS,
|
||||
$LLVM_LAZY_JIT_BUILD_OPTIONS,
|
||||
$LLVM_EAGER_JIT_BUILD_OPTIONS,
|
||||
$MULTI_TIER_JIT_BUILD_OPTIONS,
|
||||
]
|
||||
os: [macos-13]
|
||||
include:
|
||||
- os: macos-13
|
||||
llvm_cache_key: ${{ needs.build_llvm_libraries_on_intel_macos.outputs.cache_key }}
|
||||
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Get LLVM libraries
|
||||
id: retrieve_llvm_libs
|
||||
if: (!endsWith(matrix.make_options, '_INTERP_BUILD_OPTIONS'))
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
./core/deps/llvm/build/bin
|
||||
./core/deps/llvm/build/include
|
||||
./core/deps/llvm/build/lib
|
||||
./core/deps/llvm/build/libexec
|
||||
./core/deps/llvm/build/share
|
||||
key: ${{ matrix.llvm_cache_key }}
|
||||
|
||||
- name: Quit if cache miss
|
||||
if: (!endsWith(matrix.make_options, '_INTERP_BUILD_OPTIONS')) && (steps.retrieve_llvm_libs.outputs.cache-hit != 'true')
|
||||
run: echo "::error::can not get prebuilt llvm libraries" && exit 1
|
||||
|
||||
- name: install-wasi-sdk-wabt
|
||||
uses: ./.github/actions/install-wasi-sdk-wabt
|
||||
with:
|
||||
os: ${{ matrix.os }}
|
||||
|
||||
- name: Build wamrc
|
||||
if: (!endsWith(matrix.make_options, '_INTERP_BUILD_OPTIONS'))
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
cmake ..
|
||||
cmake --build . --config Release --parallel 4
|
||||
working-directory: wamr-compiler
|
||||
|
||||
- name: Build Sample [wasm-c-api]
|
||||
run: |
|
||||
VERBOSE=1
|
||||
cmake -S . -B build ${{ matrix.make_options }}
|
||||
cmake --build build --config Release --parallel 4
|
||||
cmake --build build --config Debug --parallel 4
|
||||
ctest --test-dir build --output-on-failure
|
||||
working-directory: samples/wasm-c-api
|
||||
|
||||
|
|
5
.github/workflows/spec_test_on_nuttx.yml
vendored
5
.github/workflows/spec_test_on_nuttx.yml
vendored
|
@ -139,6 +139,11 @@ jobs:
|
|||
- target_config: { target: "xtensa" }
|
||||
wamr_feature_option: { mode: "-G" }
|
||||
|
||||
# disabled for now:
|
||||
# https://github.com/espressif/llvm-project/issues/112
|
||||
- target_config: { target: "xtensa" }
|
||||
wamr_test_option: { mode: "-t aot -X" }
|
||||
|
||||
steps:
|
||||
# Note: we use an unreleased version nuttx for xtensa because
|
||||
# 12.4 doesn't contain necessary esp32s3 changes.
|
||||
|
|
|
@ -294,17 +294,17 @@ def main():
|
|||
"arc": {
|
||||
"repo": "https://github.com/llvm/llvm-project.git",
|
||||
"repo_ssh": "git@github.com:llvm/llvm-project.git",
|
||||
"branch": "release/15.x",
|
||||
"branch": "release/19.x",
|
||||
},
|
||||
"xtensa": {
|
||||
"repo": "https://github.com/espressif/llvm-project.git",
|
||||
"repo_ssh": "git@github.com:espressif/llvm-project.git",
|
||||
"branch": "xtensa_release_17.0.1",
|
||||
"branch": "xtensa_release_19.1.2",
|
||||
},
|
||||
"default": {
|
||||
"repo": "https://github.com/llvm/llvm-project.git",
|
||||
"repo_ssh": "git@github.com:llvm/llvm-project.git",
|
||||
"branch": "release/15.x",
|
||||
"branch": "release/19.x",
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -4007,8 +4007,21 @@ aot_resolve_object_relocation_group(AOTObjectData *obj_data,
|
|||
&& (str_starts_with(relocation->symbol_name, ".LCPI")
|
||||
|| str_starts_with(relocation->symbol_name, ".LJTI")
|
||||
|| str_starts_with(relocation->symbol_name, ".LBB")
|
||||
|| str_starts_with(relocation->symbol_name,
|
||||
".Lswitch.table."))) {
|
||||
|| str_starts_with(relocation->symbol_name, ".Lswitch.table.")
|
||||
#if LLVM_VERSION_MAJOR >= 16
|
||||
/* cf. https://reviews.llvm.org/D123264 */
|
||||
|| str_starts_with(relocation->symbol_name, ".Lpcrel_hi")
|
||||
#endif
|
||||
#if LLVM_VERSION_MAJOR >= 19
|
||||
/* cf.
|
||||
* https://github.com/llvm/llvm-project/pull/95031
|
||||
* https://github.com/llvm/llvm-project/pull/89693
|
||||
*
|
||||
* note: the trailing space in ".L0 " is intentional. */
|
||||
|| !strcmp(relocation->symbol_name, "")
|
||||
|| !strcmp(relocation->symbol_name, ".L0 ")
|
||||
#endif
|
||||
)) {
|
||||
/* change relocation->relocation_addend and
|
||||
relocation->symbol_name */
|
||||
LLVMSectionIteratorRef contain_section;
|
||||
|
|
|
@ -5711,6 +5711,7 @@ orcjit_thread_callback(void *arg)
|
|||
static void
|
||||
orcjit_stop_compile_threads(WASMModule *module)
|
||||
{
|
||||
#if WASM_ENABLE_LAZY_JIT != 0
|
||||
uint32 i, thread_num = (uint32)(sizeof(module->orcjit_thread_args)
|
||||
/ sizeof(OrcJitThreadArg));
|
||||
|
||||
|
@ -5719,6 +5720,7 @@ orcjit_stop_compile_threads(WASMModule *module)
|
|||
if (module->orcjit_threads[i])
|
||||
os_thread_join(module->orcjit_threads[i], NULL);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
|
@ -2493,6 +2493,7 @@ orcjit_thread_callback(void *arg)
|
|||
static void
|
||||
orcjit_stop_compile_threads(WASMModule *module)
|
||||
{
|
||||
#if WASM_ENABLE_LAZY_JIT != 0
|
||||
uint32 i, thread_num = (uint32)(sizeof(module->orcjit_thread_args)
|
||||
/ sizeof(OrcJitThreadArg));
|
||||
|
||||
|
@ -2501,6 +2502,7 @@ orcjit_stop_compile_threads(WASMModule *module)
|
|||
if (module->orcjit_threads[i])
|
||||
os_thread_join(module->orcjit_threads[i], NULL);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
# WARM API
|
||||
# WAMR API
|
||||
|
||||
* **Notice**: The python package `wamr.wamrapi.wamr` need python >= `3.10`.
|
||||
* **Notice**: The python package `wamr.wamrapi.wamr` requires a python version >= `3.10`.
|
||||
|
||||
## Setup
|
||||
|
||||
### Pre-requisites
|
||||
#### Install requirements
|
||||
Before proceeding it is necessary to make sure your Python environment is correctly configured. To do ths open a terminal session in this directory and perfom the following:
|
||||
|
||||
Install requirements,
|
||||
|
||||
```shell
|
||||
python3 -m venv venv
|
||||
source venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
|
|
|
@ -205,12 +205,3 @@ foreach(EX ${EXAMPLES})
|
|||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
endforeach()
|
||||
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
find_program(VALGRIND
|
||||
valgrind
|
||||
REQUIRED
|
||||
)
|
||||
|
||||
# run `ctest -T memcheck -V --test-dir build`
|
||||
endif()
|
||||
|
|
|
@ -46,7 +46,8 @@ temp_module_table = {}
|
|||
aot_target_options_map = {
|
||||
"i386": ["--target=i386"],
|
||||
"x86_32": ["--target=i386"],
|
||||
"x86_64": ["--target=x86_64", "--cpu=skylake"],
|
||||
# cf. https://github.com/bytecodealliance/wasm-micro-runtime/issues/3035
|
||||
"x86_64": ["--target=x86_64", "--cpu=skylake", "--size-level=0"],
|
||||
"aarch64": ["--target=aarch64", "--target-abi=eabi", "--cpu=cortex-a53"],
|
||||
"aarch64_vfp": ["--target=aarch64", "--target-abi=gnueabihf", "--cpu=cortex-a53"],
|
||||
"armv7": ["--target=armv7", "--target-abi=eabi", "--cpu=cortex-a9", "--cpu-features=-neon"],
|
||||
|
|
|
@ -712,7 +712,7 @@ main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
if (sgx_mode) {
|
||||
option.size_level = 1;
|
||||
option.size_level = 0;
|
||||
option.is_sgx_platform = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user