diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 9be92ad0..717cbbed 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -1,6 +1,6 @@ # This is a basic workflow to help you get started with Actions -name: android +name: Android # Controls when the action will run. on: @@ -31,61 +31,61 @@ jobs: cd product-mini/platforms/android mkdir build && cd build cmake .. - make + make -j $(nproc) cd .. && rm -rf build - name: Build iwasm [Classic interp] run: | cd product-mini/platforms/android mkdir build && cd build cmake .. -DWAMR_BUILD_FAST_INTERP=0 - make + make -j $(nproc) cd .. && rm -rf build - name: Build iwasm [Multi module] run: | cd product-mini/platforms/android mkdir build && cd build cmake .. -DWAMR_BUILD_MULTI_MODULE=1 - make + make -j $(nproc) cd .. && rm -rf build - name: Build iwasm [lib-pthread] run: | cd product-mini/platforms/android mkdir build && cd build cmake .. -DWAMR_BUILD_LIB_PTHREAD=1 - make + make -j $(nproc) cd .. && rm -rf build - name: Build iwasm [aot only] run: | cd product-mini/platforms/android mkdir build && cd build cmake .. -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=0 - make + make -j $(nproc) cd .. && rm -rf build - name: Build iwasm [interp only] run: | cd product-mini/platforms/android mkdir build && cd build cmake .. -DWAMR_BUILD_AOT=0 - make + make -j $(nproc) cd .. && rm -rf build - name: Build iwasm [memory profiling] run: | cd product-mini/platforms/android mkdir build && cd build cmake .. -DWAMR_BUILD_MEMORY_PROFILING=1 - make + make -j $(nproc) cd .. && rm -rf build - name: Build iwasm [tail call] run: | cd product-mini/platforms/android mkdir build && cd build cmake .. -DWAMR_BUILD_TAIL_CALL=1 - make + make -j $(nproc) cd .. && rm -rf build - name: Build iwasm [custom name section] run: | cd product-mini/platforms/android mkdir build && cd build cmake .. -DWAMR_BUILD_CUSTOM_NAME_SECTION=1 - make + make -j $(nproc) cd .. && rm -rf build diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index cae7b1b0..6f5e5942 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -29,63 +29,63 @@ jobs: cd product-mini/platforms/linux mkdir build && cd build cmake .. - make + make -j $(nproc) cd .. && rm -rf build - name: Build iwasm [Classic interp] run: | cd product-mini/platforms/linux mkdir build && cd build cmake .. -DWAMR_BUILD_FAST_INTERP=0 - make + make -j $(nproc) cd .. && rm -rf build - name: Build iwasm [Multi module] run: | cd product-mini/platforms/linux mkdir build && cd build cmake .. -DWAMR_BUILD_MULTI_MODULE=1 - make + make -j $(nproc) cd .. && rm -rf build - name: Build iwasm [lib-pthread] run: | cd product-mini/platforms/linux mkdir build && cd build cmake .. -DWAMR_BUILD_LIB_PTHREAD=1 - make + make -j $(nproc) cd .. && rm -rf build - name: Build iwasm [aot only] run: | cd product-mini/platforms/linux mkdir build && cd build cmake .. -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=0 - make + make -j $(nproc) cd .. && rm -rf build - name: Build iwasm [interp only] run: | cd product-mini/platforms/linux mkdir build && cd build cmake .. -DWAMR_BUILD_AOT=0 - make + make -j $(nproc) cd .. && rm -rf build - name: Build iwasm [memory profiling] run: | cd product-mini/platforms/linux mkdir build && cd build cmake .. -DWAMR_BUILD_MEMORY_PROFILING=1 - make + make -j $(nproc) cd .. && rm -rf build - name: Build iwasm [tail call] run: | cd product-mini/platforms/linux mkdir build && cd build cmake .. -DWAMR_BUILD_TAIL_CALL=1 - make + make -j $(nproc) cd .. && rm -rf build - name: Build iwasm [custom name section] run: | cd product-mini/platforms/linux mkdir build && cd build cmake .. -DWAMR_BUILD_CUSTOM_NAME_SECTION=1 - make + make -j $(nproc) cd .. && rm -rf build - name: Cache LLVM libraries uses: actions/cache@v2 @@ -106,7 +106,7 @@ jobs: cd wamr-compiler mkdir build && cd build cmake .. - make + make -j $(nproc) cd .. - name: download and install wasi-sdk run: | @@ -127,7 +127,7 @@ jobs: cd samples/wasm-c-api mkdir build && cd build cmake .. - make + make -j $(nproc) ./callback ./callback_chain ./global @@ -140,7 +140,7 @@ jobs: cd samples/wasm-c-api mkdir build && cd build cmake -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_AOT=1 .. - make + make -j $(nproc) ./callback ./callback_chain ./global @@ -153,7 +153,7 @@ jobs: cd samples/wasm-c-api mkdir build && cd build cmake -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_AOT=1 .. - make + make -j $(nproc) ./callback ./callback_chain ./global @@ -171,19 +171,19 @@ jobs: cd samples/multi-thread mkdir build && cd build cmake .. - make + make -j $(nproc) ./iwasm wasm-apps/test.wasm - name: Build Sample [multi-module] run: | cd samples/multi-module mkdir build && cd build cmake .. - make + make -j $(nproc) ./multi_module - name: Build Sample [spawn-thread] run: | cd samples/spawn-thread mkdir build && cd build cmake .. - make + make -j $(nproc) ./spawn_thread diff --git a/README.md b/README.md index 6ee1c6bd..4bffab04 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ The iwasm supports the following architectures: - AArch64 (Cortex-A57 and Cortex-A53 are tested) - MIPS - XTENSA -- RISCV64, RISCV32 (interpreter only) +- RISCV64, RISCV32 (RISC-V LP64 and RISC-V LP64D are tested) Following platforms are supported. Refer to [WAMR porting guide](./doc/port_wamr.md) for how to port WAMR to a new platform. diff --git a/doc/build_wasm_app.md b/doc/build_wasm_app.md index ca82531f..75345a38 100644 --- a/doc/build_wasm_app.md +++ b/doc/build_wasm_app.md @@ -236,11 +236,14 @@ wamrc supports a number of compilation options through the command line argument wamrc --help Usage: wamrc [options] -o output_file wasm_file --target= Set the target arch, which has the general format: - = x86_64, i386, aarch64, arm, thumb, xtensa, mips. + = x86_64, i386, aarch64, arm, thumb, xtensa, mips, + riscv64, riscv32. Default is host arch, e.g. x86_64 = for ex. on arm or thumb: v5, v6m, v7a, v7m, etc. Use --target=help to list supported targets - --target-abi= Set the target ABI, e.g. gnu, eabi, gnueabihf, etc. (default: gnu) + --target-abi= Set the target ABI, e.g. gnu, eabi, gnueabihf, msvc, etc. + Default is gnu if target isn't riscv64 or riscv32 + For target riscv64 and riscv32, default is lp64d and ilp32d Use --target-abi=help to list all the ABI supported --cpu= Set the target CPU (default: host CPU, e.g. skylake) Use --cpu=help to list all the CPU supported @@ -263,10 +266,16 @@ Usage: wamrc [options] -o output_file wasm_file llvmir-opt Optimized LLVM IR --enable-bulk-memory Enable the post-MVP bulk memory feature --enable-multi-thread Enable multi-thread feature, the dependent features bulk-memory and - --enable-tail-call Enable the post-MVP tail call feature thread-mgr will be enabled automatically - --enable-simd Enable the post-MVP 128-bit SIMD feature + --enable-tail-call Enable the post-MVP tail call feature + --disable-simd Disable the post-MVP 128-bit SIMD feature: + currently 128-bit SIMD is only supported for x86-64 target, + and by default it is enabled in x86-64 target and disabled + in other targets + --enable-ref-types Enable the post-MVP reference types feature + --disable-aux-stack-check Disable auxiliary stack overflow/underflow check --enable-dump-call-stack Enable stack trace feature + --enable-perf-profiling Enable function performance profiling -v=n Set log verbose level (0 to 5, default is 2), larger with more log Examples: wamrc -o test.aot test.wasm wamrc --target=i386 -o test.aot test.wasm