mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-09-05 17:32:26 +00:00
Compare commits
2 Commits
dd4e361af9
...
86b5e3d50e
Author | SHA1 | Date | |
---|---|---|---|
![]() |
86b5e3d50e | ||
![]() |
ff791ea967 |
28
.github/workflows/build_wamrc.yml
vendored
28
.github/workflows/build_wamrc.yml
vendored
|
@ -37,6 +37,14 @@ permissions:
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ${{ inputs.runner }}
|
runs-on: ${{ inputs.runner }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- build_options: ""
|
||||||
|
suffix: "-gc"
|
||||||
|
- build_options: "-DWAMR_BUILD_GC=0"
|
||||||
|
suffix: ""
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write # for uploading release artifacts
|
contents: write # for uploading release artifacts
|
||||||
|
|
||||||
|
@ -58,7 +66,7 @@ jobs:
|
||||||
|
|
||||||
- name: generate wamrc binary release
|
- name: generate wamrc binary release
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -B build
|
cmake -S . -B build ${{ matrix.build_options }}
|
||||||
cmake --build build --config Release --parallel 4
|
cmake --build build --config Release --parallel 4
|
||||||
working-directory: wamr-compiler
|
working-directory: wamr-compiler
|
||||||
|
|
||||||
|
@ -89,17 +97,17 @@ jobs:
|
||||||
- name: Compress the binary on Windows
|
- name: Compress the binary on Windows
|
||||||
if: inputs.runner == 'windows-latest' && inputs.release
|
if: inputs.runner == 'windows-latest' && inputs.release
|
||||||
run: |
|
run: |
|
||||||
tar -czf wamrc-${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz wamrc.exe
|
tar -czf wamrc${{ matrix.suffix }}-${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz wamrc.exe
|
||||||
Compress-Archive -Path wamrc.exe -DestinationPath wamrc-${{ inputs.ver_num }}-${{ inputs.runner }}.zip
|
Compress-Archive -Path wamrc.exe -DestinationPath wamrc${{ matrix.suffix }}-${{ inputs.ver_num }}-${{ inputs.runner }}.zip
|
||||||
mv wamrc-${{ inputs.ver_num }}-${{ inputs.runner }}.* ../
|
mv wamrc${{ matrix.suffix }}-${{ inputs.ver_num }}-${{ inputs.runner }}.* ../
|
||||||
working-directory: wamr-compiler/build/Release
|
working-directory: wamr-compiler/build/Release
|
||||||
|
|
||||||
- name: compress the binary on non-Windows
|
- name: compress the binary on non-Windows
|
||||||
if: inputs.runner != 'windows-latest' && inputs.release
|
if: inputs.runner != 'windows-latest' && inputs.release
|
||||||
run: |
|
run: |
|
||||||
# Follow the symlink to the actual binary file
|
# Follow the symlink to the actual binary file
|
||||||
tar --dereference -czf wamrc-${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz wamrc
|
tar --dereference -czf wamrc${{ matrix.suffix }}-${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz wamrc
|
||||||
zip wamrc-${{ inputs.ver_num }}-${{ inputs.runner }}.zip wamrc
|
zip wamrc${{ matrix.suffix }}-${{ inputs.ver_num }}-${{ inputs.runner }}.zip wamrc
|
||||||
working-directory: wamr-compiler/build
|
working-directory: wamr-compiler/build
|
||||||
|
|
||||||
- name: upload release tar.gz
|
- name: upload release tar.gz
|
||||||
|
@ -109,8 +117,8 @@ jobs:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ inputs.upload_url }}
|
upload_url: ${{ inputs.upload_url }}
|
||||||
asset_path: wamr-compiler/build/wamrc-${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz
|
asset_path: wamr-compiler/build/wamrc${{ matrix.suffix }}-${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz
|
||||||
asset_name: wamrc-${{ inputs.ver_num }}-${{ inputs.arch }}-${{ inputs.runner }}.tar.gz
|
asset_name: wamrc${{ matrix.suffix }}-${{ inputs.ver_num }}-${{ inputs.arch }}-${{ inputs.runner }}.tar.gz
|
||||||
asset_content_type: application/x-gzip
|
asset_content_type: application/x-gzip
|
||||||
|
|
||||||
- name: upload release zip
|
- name: upload release zip
|
||||||
|
@ -120,6 +128,6 @@ jobs:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ inputs.upload_url }}
|
upload_url: ${{ inputs.upload_url }}
|
||||||
asset_path: wamr-compiler/build/wamrc-${{ inputs.ver_num }}-${{ inputs.runner }}.zip
|
asset_path: wamr-compiler/build/wamrc${{ matrix.suffix }}-${{ inputs.ver_num }}-${{ inputs.runner }}.zip
|
||||||
asset_name: wamrc-${{ inputs.ver_num }}-${{ inputs.arch }}-${{ inputs.runner }}.zip
|
asset_name: wamrc${{ matrix.suffix }}-${{ inputs.ver_num }}-${{ inputs.arch }}-${{ inputs.runner }}.zip
|
||||||
asset_content_type: application/zip
|
asset_content_type: application/zip
|
||||||
|
|
|
@ -55,7 +55,15 @@ add_definitions(-DWASM_ENABLE_MODULE_INST_CONTEXT=1)
|
||||||
add_definitions(-DWASM_ENABLE_MEMORY64=1)
|
add_definitions(-DWASM_ENABLE_MEMORY64=1)
|
||||||
add_definitions(-DWASM_ENABLE_EXTENDED_CONST_EXPR=1)
|
add_definitions(-DWASM_ENABLE_EXTENDED_CONST_EXPR=1)
|
||||||
|
|
||||||
add_definitions(-DWASM_ENABLE_GC=1)
|
# Sync with iwasm in config_common.cmake. Turn off GC by default.
|
||||||
|
# can be turned on by setting WAMR_BUILD_GC to 1
|
||||||
|
if (NOT DEFINED WAMR_BUILD_GC)
|
||||||
|
set(WAMR_BUILD_GC 0)
|
||||||
|
add_definitions(-DWASM_ENABLE_GC=0)
|
||||||
|
else ()
|
||||||
|
set(WAMR_BUILD_GC 1)
|
||||||
|
add_definitions(-DWASM_ENABLE_GC=${WAMR_BUILD_GC})
|
||||||
|
endif ()
|
||||||
|
|
||||||
set (WAMR_BUILD_STRINGREF 1)
|
set (WAMR_BUILD_STRINGREF 1)
|
||||||
set (WAMR_STRINGREF_IMPL_SOURCE "STUB")
|
set (WAMR_STRINGREF_IMPL_SOURCE "STUB")
|
||||||
|
@ -285,7 +293,11 @@ include (${SHARED_DIR}/utils/shared_utils.cmake)
|
||||||
include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake)
|
include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake)
|
||||||
include (${IWASM_DIR}/libraries/thread-mgr/thread_mgr.cmake)
|
include (${IWASM_DIR}/libraries/thread-mgr/thread_mgr.cmake)
|
||||||
include (${IWASM_DIR}/common/iwasm_common.cmake)
|
include (${IWASM_DIR}/common/iwasm_common.cmake)
|
||||||
include (${IWASM_DIR}/common/gc/iwasm_gc.cmake)
|
if (WAMR_BUILD_GC EQUAL 1)
|
||||||
|
include (${IWASM_DIR}/common/gc/iwasm_gc.cmake)
|
||||||
|
else ()
|
||||||
|
message (STATUS "WAMR GC is disabled")
|
||||||
|
endif ()
|
||||||
include (${IWASM_DIR}/interpreter/iwasm_interp.cmake)
|
include (${IWASM_DIR}/interpreter/iwasm_interp.cmake)
|
||||||
include (${IWASM_DIR}/aot/iwasm_aot.cmake)
|
include (${IWASM_DIR}/aot/iwasm_aot.cmake)
|
||||||
include (${IWASM_DIR}/compilation/iwasm_compl.cmake)
|
include (${IWASM_DIR}/compilation/iwasm_compl.cmake)
|
||||||
|
|
|
@ -179,7 +179,6 @@ print_help()
|
||||||
printf(" --enable-memory-profiling Enable memory usage profiling\n");
|
printf(" --enable-memory-profiling Enable memory usage profiling\n");
|
||||||
printf(" --xip A shorthand of --enable-indirect-mode --disable-llvm-intrinsics\n");
|
printf(" --xip A shorthand of --enable-indirect-mode --disable-llvm-intrinsics\n");
|
||||||
printf(" --enable-indirect-mode Enable call function through symbol table but not direct call\n");
|
printf(" --enable-indirect-mode Enable call function through symbol table but not direct call\n");
|
||||||
printf(" --enable-gc Enable GC (Garbage Collection) feature\n");
|
|
||||||
printf(" --disable-llvm-intrinsics Disable the LLVM built-in intrinsics\n");
|
printf(" --disable-llvm-intrinsics Disable the LLVM built-in intrinsics\n");
|
||||||
printf(" --enable-builtin-intrinsics=<flags>\n");
|
printf(" --enable-builtin-intrinsics=<flags>\n");
|
||||||
printf(" Enable the specified built-in intrinsics, it will override the default\n");
|
printf(" Enable the specified built-in intrinsics, it will override the default\n");
|
||||||
|
@ -424,7 +423,11 @@ main(int argc, char *argv[])
|
||||||
option.enable_aux_stack_check = true;
|
option.enable_aux_stack_check = true;
|
||||||
option.enable_bulk_memory = true;
|
option.enable_bulk_memory = true;
|
||||||
option.enable_ref_types = true;
|
option.enable_ref_types = true;
|
||||||
|
#if WASM_ENABLE_GC != 0
|
||||||
|
option.enable_gc = true;
|
||||||
|
#else
|
||||||
option.enable_gc = false;
|
option.enable_gc = false;
|
||||||
|
#endif
|
||||||
option.enable_extended_const = false;
|
option.enable_extended_const = false;
|
||||||
aot_call_stack_features_init_default(&option.call_stack_features);
|
aot_call_stack_features_init_default(&option.call_stack_features);
|
||||||
|
|
||||||
|
@ -573,10 +576,6 @@ main(int argc, char *argv[])
|
||||||
else if (!strcmp(argv[0], "--enable-indirect-mode")) {
|
else if (!strcmp(argv[0], "--enable-indirect-mode")) {
|
||||||
option.is_indirect_mode = true;
|
option.is_indirect_mode = true;
|
||||||
}
|
}
|
||||||
else if (!strcmp(argv[0], "--enable-gc")) {
|
|
||||||
option.aux_stack_frame_type = AOT_STACK_FRAME_TYPE_STANDARD;
|
|
||||||
option.enable_gc = true;
|
|
||||||
}
|
|
||||||
else if (!strcmp(argv[0], "--disable-llvm-intrinsics")) {
|
else if (!strcmp(argv[0], "--disable-llvm-intrinsics")) {
|
||||||
option.disable_llvm_intrinsics = true;
|
option.disable_llvm_intrinsics = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user