Skip to content

Commit d285f76

Browse files
authored
Merge branch 'main' into fix/customized_codeql
2 parents 915b00e + 17be90d commit d285f76

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+4650
-1063
lines changed

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949

5050
# Initializes the CodeQL tools for scanning.
5151
- name: Initialize CodeQL
52-
uses: github/codeql-action/[email protected].1
52+
uses: github/codeql-action/[email protected].2
5353
with:
5454
languages: ${{ matrix.language }}
5555
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
@@ -61,7 +61,7 @@ jobs:
6161
./.github/scripts/codeql_buildscript.sh
6262
6363
- name: Perform CodeQL Analysis
64-
uses: github/codeql-action/[email protected].1
64+
uses: github/codeql-action/[email protected].2
6565
with:
6666
category: "/language:${{matrix.language}}"
6767
upload: false
@@ -114,7 +114,7 @@ jobs:
114114
output: ${{ steps.step1.outputs.sarif-output }}/cpp.sarif
115115

116116
- name: Upload CodeQL results to code scanning
117-
uses: github/codeql-action/[email protected].1
117+
uses: github/codeql-action/[email protected].2
118118
with:
119119
sarif_file: ${{ steps.step1.outputs.sarif-output }}
120120
category: "/language:${{matrix.language}}"

.github/workflows/compilation_on_android_ubuntu.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ env:
6969
GC_TEST_OPTIONS: "-s spec -G -b -P"
7070
MEMORY64_TEST_OPTIONS: "-s spec -W -b -P"
7171
MULTI_MEMORY_TEST_OPTIONS: "-s spec -E -b -P"
72+
EXTENDED_CONST_EXPR_TEST_OPTIONS: "-s spec -N -b -P"
7273

7374
permissions:
7475
contents: read
@@ -164,6 +165,7 @@ jobs:
164165
"-DWAMR_BUILD_MEMORY64=1",
165166
"-DWAMR_BUILD_MULTI_MEMORY=1",
166167
"-DWAMR_BUILD_SHARED=1",
168+
"-DWAMR_BUILD_EXTENDED_CONST_EXPR=1",
167169
]
168170
os: [ubuntu-22.04]
169171
platform: [android, linux]
@@ -609,6 +611,7 @@ jobs:
609611
$GC_TEST_OPTIONS,
610612
$MEMORY64_TEST_OPTIONS,
611613
$MULTI_MEMORY_TEST_OPTIONS,
614+
$EXTENDED_CONST_EXPR_TEST_OPTIONS,
612615
]
613616
include:
614617
- os: ubuntu-22.04

.github/workflows/compilation_on_macos.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ jobs:
142142
"-DWAMR_BUILD_SIMD=1",
143143
"-DWAMR_BUILD_TAIL_CALL=1",
144144
"-DWAMR_DISABLE_HW_BOUND_CHECK=1",
145+
"-DWAMR_BUILD_EXTENDED_CONST_EXPR=1",
145146
]
146147
os: [macos-13]
147148
platform: [darwin]

.github/workflows/compilation_on_sgx.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ jobs:
100100
"-DWAMR_BUILD_MULTI_MODULE=1",
101101
"-DWAMR_BUILD_PERF_PROFILING=1",
102102
"-DWAMR_BUILD_REF_TYPES=1",
103+
"-DWAMR_BUILD_EXTENDED_CONST_EXPR=1",
103104
# doesn't support
104105
"-DWAMR_BUILD_SIMD=0",
105106
"-DWAMR_BUILD_TAIL_CALL=1",

.github/workflows/nightly_run.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ env:
3737
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"
3838
# For Spec Test
3939
DEFAULT_TEST_OPTIONS: "-s spec -b -P"
40+
EXTENDED_CONST_EXPR_TEST_OPTIONS: "-s spec -b -P -N"
4041
MULTI_MODULES_TEST_OPTIONS: "-s spec -b -P -M"
4142
SIMD_TEST_OPTIONS: "-s spec -b -P -S"
4243
THREADS_TEST_OPTIONS: "-s spec -b -P -p"
@@ -128,6 +129,7 @@ jobs:
128129
"-DWAMR_BUILD_MEMORY64=1",
129130
"-DWAMR_BUILD_MULTI_MEMORY=1",
130131
"-DWAMR_BUILD_SHARED=1",
132+
"-DWAMR_BUILD_EXTENDED_CONST_EXPR=1",
131133
]
132134
os: [ubuntu-22.04]
133135
platform: [android, linux]
@@ -588,6 +590,7 @@ jobs:
588590
$DEFAULT_TEST_OPTIONS,
589591
$MULTI_MODULES_TEST_OPTIONS,
590592
$SIMD_TEST_OPTIONS,
593+
$EXTENDED_CONST_EXPR_TEST_OPTIONS,
591594
$THREADS_TEST_OPTIONS,
592595
$WASI_TEST_OPTIONS,
593596
]

.github/workflows/supply_chain.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ jobs:
6060

6161
# Upload the results to GitHub's code scanning dashboard.
6262
- name: "Upload to code-scanning"
63-
uses: github/codeql-action/upload-sarif@4c57370d0304fbff638216539f81d9163f77712a
63+
uses: github/codeql-action/upload-sarif@b69421388d5449cc5a5e1ca344d71926bda69e07
6464
with:
6565
sarif_file: results.sarif

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ WebAssembly Micro Runtime (WAMR) is a lightweight standalone WebAssembly (Wasm)
4848
- [Reference Types](https://github.com/WebAssembly/reference-types), ref to [document](doc/ref_types.md) and [sample](samples/ref-types)
4949
- [Bulk memory operations](https://github.com/WebAssembly/bulk-memory-operations), [Shared memory](https://github.com/WebAssembly/threads/blob/main/proposals/threads/Overview.md#shared-linear-memory), [Memory64](https://github.com/WebAssembly/memory64)
5050
- [Tail-call](https://github.com/WebAssembly/tail-call), [Garbage Collection](https://github.com/WebAssembly/gc), [Exception Handling](https://github.com/WebAssembly/exception-handling)
51+
- [Extended Constant Expressions](https://github.com/WebAssembly/extended-const)
5152

5253
### Supported architectures and platforms
5354
The WAMR VMcore supports the following architectures:

build-scripts/config_common.cmake

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,10 @@ if (NOT DEFINED WAMR_BUILD_TAIL_CALL)
211211
set (WAMR_BUILD_TAIL_CALL 0)
212212
endif ()
213213

214+
if (NOT DEFINED WAMR_BUILD_EXTENDED_CONST_EXPR)
215+
set (WAMR_BUILD_EXTENDED_CONST_EXPR 0)
216+
endif ()
217+
214218
########################################
215219
# Compilation options to marco
216220
########################################
@@ -673,7 +677,13 @@ if (WAMR_BUILD_INSTRUCTION_METERING EQUAL 1)
673677
message (" Instruction metering enabled")
674678
add_definitions (-DWASM_ENABLE_INSTRUCTION_METERING=1)
675679
endif ()
676-
680+
if (WAMR_BUILD_EXTENDED_CONST_EXPR EQUAL 1)
681+
message (" Extended constant expression enabled")
682+
add_definitions(-DWASM_ENABLE_EXTENDED_CONST_EXPR=1)
683+
else()
684+
message (" Extended constant expression disabled")
685+
add_definitions(-DWASM_ENABLE_EXTENDED_CONST_EXPR=0)
686+
endif ()
677687
########################################
678688
# Show Phase4 Wasm proposals status.
679689
########################################
@@ -687,6 +697,7 @@ message (
687697
" \"WebAssembly C and C++ API\"\n"
688698
" Configurable. 0 is OFF. 1 is ON:\n"
689699
" \"Bulk Memory Operation\" via WAMR_BUILD_BULK_MEMORY: ${WAMR_BUILD_BULK_MEMORY}\n"
700+
" \"Extended Constant Expressions\" via WAMR_BUILD_EXTENDED_CONST_EXPR: ${WAMR_BUILD_EXTENDED_CONST_EXPR}\n"
690701
" \"Fixed-width SIMD\" via WAMR_BUILD_SIMD: ${WAMR_BUILD_SIMD}\n"
691702
" \"Garbage collection\" via WAMR_BUILD_GC: ${WAMR_BUILD_GC}\n"
692703
" \"Legacy Exception handling\" via WAMR_BUILD_EXCE_HANDLING: ${WAMR_BUILD_EXCE_HANDLING}\n"
@@ -701,7 +712,6 @@ message (
701712
" \"Branch Hinting\"\n"
702713
" \"Custom Annotation Syntax in the Text Format\"\n"
703714
" \"Exception handling\"\n"
704-
" \"Extended Constant Expressions\"\n"
705715
" \"Import/Export of Mutable Globals\"\n"
706716
" \"JS String Builtins\"\n"
707717
" \"Relaxed SIMD\"\n"

core/config.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,4 +720,8 @@ unless used elsewhere */
720720
#define WASM_ENABLE_INSTRUCTION_METERING 0
721721
#endif
722722

723+
#ifndef WASM_ENABLE_EXTENDED_CONST_EXPR
724+
#define WASM_ENABLE_EXTENDED_CONST_EXPR 0
725+
#endif
726+
723727
#endif /* end of _CONFIG_H_ */

0 commit comments

Comments
 (0)