Skip to content

Commit cf94412

Browse files
committed
Remove enabling by default features from build_iwasm
- SIMD and Ref. types are eanbled by default on linux and darwin - Apply new configration for wasm-c-api compliation commands
1 parent 49175fb commit cf94412

File tree

5 files changed

+94
-56
lines changed

5 files changed

+94
-56
lines changed

.github/workflows/compilation_on_android_ubuntu.yml

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,7 @@ jobs:
167167
os: [ubuntu-22.04]
168168
platform: [android, linux]
169169
exclude:
170-
# incompatible feature and platform
171-
# incompatible mode and feature
170+
# incompatible feature and platform and mode
172171
# MULTI_MODULE only on INTERP mode and AOT mode
173172
- make_options_run_mode: $FAST_JIT_BUILD_OPTIONS
174173
make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1"
@@ -261,13 +260,15 @@ jobs:
261260
include:
262261
- os: ubuntu-22.04
263262
llvm_cache_key: ${{ needs.build_llvm_libraries_on_ubuntu_2204.outputs.cache_key }}
264-
# classic interp , fast-jit, multi-tier-jit mode doesn't support SIMD
263+
# classic interp doesn't support SIMD
265264
- make_options_run_mode: $CLASSIC_INTERP_BUILD_OPTIONS
266-
make_options_feature: "-DWAMR_BUILD_SIMD=0"
265+
extra_options: "-DWAMR_BUILD_SIMD=0"
266+
# fast jit doesn't support SIMD
267267
- make_options_run_mode: $FAST_JIT_BUILD_OPTIONS
268-
make_options_feature: "-DWAMR_BUILD_SIMD=0"
268+
extra_options: "-DWAMR_BUILD_SIMD=0"
269+
# multi-tier jit doesn't support SIMD
269270
- make_options_run_mode: $MULTI_TIER_JIT_BUILD_OPTIONS
270-
make_options_feature: "-DWAMR_BUILD_SIMD=0"
271+
extra_options: "-DWAMR_BUILD_SIMD=0"
271272
steps:
272273
- name: checkout
273274
uses: actions/checkout@v5
@@ -294,7 +295,7 @@ jobs:
294295
if: matrix.platform == 'linux'
295296
run: |
296297
mkdir build && cd build
297-
cmake .. -DCMAKE_C_FLAGS="-Werror" ${{ matrix.make_options_run_mode }} ${{ matrix.make_options_feature }}
298+
cmake .. -DCMAKE_C_FLAGS="-Werror" ${{ matrix.make_options_run_mode }} ${{ matrix.make_options_feature }} ${{ matrix.extra_options}}
298299
cmake --build . --config Release --parallel 4
299300
working-directory: product-mini/platforms/${{ matrix.platform }}
300301

@@ -426,18 +427,20 @@ jobs:
426427
include:
427428
- os: ubuntu-22.04
428429
llvm_cache_key: ${{ needs.build_llvm_libraries_on_ubuntu_2204.outputs.cache_key }}
429-
# classic interp and fast jit mode doesn't support SIMD
430-
- make_options_run_mode: $CLASSIC_INTERP_BUILD_OPTIONS
431-
make_options_feature: "-DWAMR_BUILD_SIMD=0"
432-
- make_options_run_mode: $FAST_JIT_BUILD_OPTIONS
433-
make_options_feature: "-DWAMR_BUILD_SIMD=0 -DWAMR_BUILD_MULTI_MODULE=0"
434-
- make_options_run_mode: $MULTI_TIER_JIT_BUILD_OPTIONS
435-
make_options_feature: "-DWAMR_BUILD_SIMD=0 -DWAMR_BUILD_MULTI_MODULE=0"
436-
# MULTI_MODULE only on INTERP mode and AOT mode
437-
- make_options_run_mode: $LLVM_LAZY_JIT_BUILD_OPTIONS
438-
make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=0"
439-
- make_options_run_mode: $LLVM_EAGER_JIT_BUILD_OPTIONS
440-
make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=0"
430+
# classic interp doesn't support SIMD
431+
- make_options: $CLASSIC_INTERP_BUILD_OPTIONS
432+
extra_options: "-DWAMR_BUILD_SIMD=0"
433+
# fast jit doesn't support Multi-module and SIMD
434+
- make_options: $FAST_JIT_BUILD_OPTIONS
435+
extra_options: "-DWAMR_BUILD_SIMD=0 -DWAMR_BUILD_MULTI_MODULE=0"
436+
# multi-tier jit doesn't support Multi-module and SIMD
437+
- make_options: $MULTI_TIER_JIT_BUILD_OPTIONS
438+
extra_options: "-DWAMR_BUILD_SIMD=0 -DWAMR_BUILD_MULTI_MODULE=0"
439+
# LLVM JIT doesn't support Multi-module
440+
- make_options: $LLVM_LAZY_JIT_BUILD_OPTIONS
441+
extra_options: "-DWAMR_BUILD_MULTI_MODULE=0"
442+
- make_options: $LLVM_EAGER_JIT_BUILD_OPTIONS
443+
extra_options: "-DWAMR_BUILD_MULTI_MODULE=0"
441444

442445
steps:
443446
- name: checkout
@@ -476,7 +479,7 @@ jobs:
476479
- name: Build Sample [wasm-c-api]
477480
run: |
478481
VERBOSE=1
479-
cmake -S . -B build ${{ matrix.make_options }}
482+
cmake -S . -B build ${{ matrix.make_options }} ${{ matrix.extra_options }}
480483
cmake --build build --config Debug --parallel 4
481484
ctest --test-dir build --output-on-failure
482485
working-directory: samples/wasm-c-api

.github/workflows/compilation_on_macos.yml

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ jobs:
138138
"-DWAMR_BUILD_MEMORY_PROFILING=1",
139139
"-DWAMR_BUILD_MULTI_MODULE=1",
140140
"-DWAMR_BUILD_PERF_PROFILING=1",
141-
"-DWAMR_BUILD_REF_TYPES=1",
142-
"-DWAMR_BUILD_SIMD=1",
143141
"-DWAMR_BUILD_TAIL_CALL=1",
144142
"-DWAMR_DISABLE_HW_BOUND_CHECK=1",
145143
"-DWAMR_BUILD_EXTENDED_CONST_EXPR=1",
@@ -154,11 +152,6 @@ jobs:
154152
make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1"
155153
- make_options_run_mode: $LLVM_EAGER_JIT_BUILD_OPTIONS
156154
make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1"
157-
# SIMD only on JIT/AOT mode
158-
- make_options_run_mode: $CLASSIC_INTERP_BUILD_OPTIONS
159-
make_options_feature: "-DWAMR_BUILD_SIMD=1"
160-
- make_options_run_mode: $FAST_INTERP_BUILD_OPTIONS
161-
make_options_feature: "-DWAMR_BUILD_SIMD=1"
162155
# DEBUG_INTERP only on CLASSIC INTERP mode
163156
- make_options_run_mode: $AOT_BUILD_OPTIONS
164157
make_options_feature: "-DWAMR_BUILD_DEBUG_INTERP=1"
@@ -185,15 +178,18 @@ jobs:
185178
make_options_feature: "-DWAMR_BUILD_MINI_LOADER=1"
186179
- make_options_run_mode: $LLVM_EAGER_JIT_BUILD_OPTIONS
187180
make_options_feature: "-DWAMR_BUILD_MINI_LOADER=1"
188-
# classic interp mode doesn't support SIMD
189-
- make_options_run_mode: $CLASSIC_INTERP_BUILD_OPTIONS
190-
make_options_feature: "-DWAMR_BUILD_SIMD=1"
191181
include:
192182
- os: macos-13
193183
llvm_cache_key: ${{ needs.build_llvm_libraries_on_intel_macos.outputs.cache_key }}
194-
# classic interp mode doesn't support SIMD
184+
# classic interp doesn't support SIMD
195185
- make_options_run_mode: $CLASSIC_INTERP_BUILD_OPTIONS
196-
make_options_feature: "-DWAMR_BUILD_SIMD=0"
186+
extra_options: "-DWAMR_BUILD_SIMD=0"
187+
# fast jit doesn't support SIMD
188+
- make_options_run_mode: $FAST_JIT_BUILD_OPTIONS
189+
extra_options: "-DWAMR_BUILD_SIMD=0"
190+
# multi-tier jit doesn't support SIMD
191+
- make_options_run_mode: $MULTI_TIER_JIT_BUILD_OPTIONS
192+
extra_options: "-DWAMR_BUILD_SIMD=0"
197193
steps:
198194
- name: checkout
199195
uses: actions/checkout@v5
@@ -219,7 +215,7 @@ jobs:
219215
- name: Build iwasm
220216
run: |
221217
mkdir build && cd build
222-
cmake .. -DCMAKE_C_FLAGS="-Werror" ${{ matrix.make_options_run_mode }} ${{ matrix.make_options_feature }}
218+
cmake .. -DCMAKE_C_FLAGS="-Werror" ${{ matrix.make_options_run_mode }} ${{ matrix.make_options_feature }} ${{ matrix.extra_options }}
223219
cmake --build . --config Release --parallel 4
224220
working-directory: product-mini/platforms/${{ matrix.platform }}
225221

@@ -246,6 +242,20 @@ jobs:
246242
include:
247243
- os: macos-13
248244
llvm_cache_key: ${{ needs.build_llvm_libraries_on_intel_macos.outputs.cache_key }}
245+
# classic interp doesn't support SIMD
246+
- make_options: $CLASSIC_INTERP_BUILD_OPTIONS
247+
extra_options: "-DWAMR_BUILD_SIMD=0"
248+
# fast jit doesn't support Multi-module and SIMD
249+
- make_options: $FAST_JIT_BUILD_OPTIONS
250+
extra_options: "-DWAMR_BUILD_SIMD=0 -DWAMR_BUILD_MULTI_MODULE=0"
251+
# multi-tier jit doesn't support Multi-module and SIMD
252+
- make_options: $MULTI_TIER_JIT_BUILD_OPTIONS
253+
extra_options: "-DWAMR_BUILD_SIMD=0 -DWAMR_BUILD_MULTI_MODULE=0"
254+
# LLVM JIT doesn't support Multi-module
255+
- make_options: $LLVM_LAZY_JIT_BUILD_OPTIONS
256+
extra_options: "-DWAMR_BUILD_MULTI_MODULE=0"
257+
- make_options: $LLVM_EAGER_JIT_BUILD_OPTIONS
258+
extra_options: "-DWAMR_BUILD_MULTI_MODULE=0"
249259

250260
steps:
251261
- name: checkout
@@ -284,7 +294,7 @@ jobs:
284294
- name: Build Sample [wasm-c-api]
285295
run: |
286296
VERBOSE=1
287-
cmake -S . -B build ${{ matrix.make_options }}
297+
cmake -S . -B build ${{ matrix.make_options }} ${{ matrix.extra_options }}
288298
cmake --build build --config Debug --parallel 4
289299
ctest --test-dir build --output-on-failure
290300
working-directory: samples/wasm-c-api

.github/workflows/compilation_on_windows.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ jobs:
7878
"-DWAMR_BUILD_CUSTOM_NAME_SECTION=1",
7979
"-DWAMR_DISABLE_HW_BOUND_CHECK=1",
8080
"-DWAMR_BUILD_REF_TYPES=1",
81-
"-DWAMR_BUILD_SIMD=1",
8281
"-DWAMR_BUILD_DEBUG_INTERP=1",
8382
"-DWAMR_BUILD_LIB_PTHREAD=1",
8483
"-DWAMR_BUILD_LIB_WASI_THREADS=1",

.github/workflows/nightly_run.yml

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@ jobs:
122122
"-DWAMR_BUILD_MEMORY_PROFILING=1",
123123
"-DWAMR_BUILD_MULTI_MODULE=1",
124124
"-DWAMR_BUILD_PERF_PROFILING=1",
125-
"-DWAMR_BUILD_REF_TYPES=1",
126-
"-DWAMR_BUILD_SIMD=1",
127125
"-DWAMR_BUILD_TAIL_CALL=1",
128126
"-DWAMR_DISABLE_HW_BOUND_CHECK=1",
129127
"-DWAMR_BUILD_MEMORY64=1",
@@ -145,11 +143,6 @@ jobs:
145143
make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1"
146144
- make_options_run_mode: $MULTI_TIER_JIT_BUILD_OPTIONS
147145
make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1"
148-
# SIMD only on JIT/AOT mode
149-
- make_options_run_mode: $CLASSIC_INTERP_BUILD_OPTIONS
150-
make_options_feature: "-DWAMR_BUILD_SIMD=1"
151-
- make_options_run_mode: $FAST_INTERP_BUILD_OPTIONS
152-
make_options_feature: "-DWAMR_BUILD_SIMD=1"
153146
# DEBUG_INTERP only on CLASSIC INTERP mode
154147
- make_options_run_mode: $AOT_BUILD_OPTIONS
155148
make_options_feature: "-DWAMR_BUILD_DEBUG_INTERP=1"
@@ -230,6 +223,15 @@ jobs:
230223
include:
231224
- os: ubuntu-22.04
232225
llvm_cache_key: ${{ needs.build_llvm_libraries_on_ubuntu.outputs.cache_key }}
226+
# classic interp doesn't support SIMD
227+
- make_options_run_mode: $CLASSIC_INTERP_BUILD_OPTIONS
228+
extra_options: "-DWAMR_BUILD_SIMD=0"
229+
# fast jit doesn't support SIMD
230+
- make_options_run_mode: $FAST_JIT_BUILD_OPTIONS
231+
extra_options: "-DWAMR_BUILD_SIMD=0"
232+
# multi-tier jit doesn't support SIMD
233+
- make_options_run_mode: $MULTI_TIER_JIT_BUILD_OPTIONS
234+
extra_options: "-DWAMR_BUILD_SIMD=0"
233235

234236
steps:
235237
- name: checkout
@@ -257,15 +259,15 @@ jobs:
257259
if: matrix.platform == 'linux'
258260
run: |
259261
mkdir build && cd build
260-
cmake .. ${{ matrix.make_options_run_mode }} ${{ matrix.make_options_feature }}
262+
cmake .. ${{ matrix.make_options_run_mode }} ${{ matrix.make_options_feature }} ${{ matrix.extra_options }}
261263
cmake --build . --config Release --parallel 4
262264
working-directory: product-mini/platforms/${{ matrix.platform }}
263265

264266
- name: Build iwasm for android
265267
if: matrix.platform == 'android'
266268
run: |
267269
mkdir build && cd build
268-
cmake .. ${{ matrix.make_options_run_mode }} ${{ matrix.make_options_feature }} \
270+
cmake .. ${{ matrix.make_options_run_mode }} ${{ matrix.make_options_feature }} ${{ matrix.extra_options }} \
269271
-DWAMR_BUILD_TARGET=X86_64
270272
cmake --build . --config Release --parallel 4
271273
working-directory: product-mini/platforms/${{ matrix.platform }}
@@ -295,8 +297,6 @@ jobs:
295297
"-DWAMR_BUILD_MEMORY_PROFILING=1",
296298
"-DWAMR_BUILD_MULTI_MODULE=1",
297299
"-DWAMR_BUILD_PERF_PROFILING=1",
298-
"-DWAMR_BUILD_REF_TYPES=1",
299-
"-DWAMR_BUILD_SIMD=1",
300300
"-DWAMR_BUILD_TAIL_CALL=1",
301301
"-DWAMR_DISABLE_HW_BOUND_CHECK=1",
302302
"-DWAMR_BUILD_MEMORY64=1",
@@ -339,6 +339,16 @@ jobs:
339339
make_options_feature: "-DWAMR_BUILD_MULTI_MEMORY=1"
340340
- make_options_run_mode: $FAST_JIT_BUILD_OPTIONS
341341
make_options_feature: "-DWAMR_BUILD_MULTI_MEMORY=1"
342+
include:
343+
# classic interp doesn't support SIMD
344+
- make_options_run_mode: $CLASSIC_INTERP_BUILD_OPTIONS
345+
extra_options: "-DWAMR_BUILD_SIMD=0"
346+
# fast jit doesn't support SIMD
347+
- make_options_run_mode: $FAST_JIT_BUILD_OPTIONS
348+
extra_options: "-DWAMR_BUILD_SIMD=0"
349+
# multi-tier jit doesn't support SIMD
350+
- make_options_run_mode: $MULTI_TIER_JIT_BUILD_OPTIONS
351+
extra_options: "-DWAMR_BUILD_SIMD=0"
342352
steps:
343353
- name: Install dependencies
344354
run: |
@@ -357,7 +367,7 @@ jobs:
357367
- name: Build iwasm
358368
run: |
359369
mkdir build && cd build
360-
cmake .. ${{ matrix.make_options_run_mode }} ${{ matrix.make_options_feature }} -DCMAKE_C_COMPILER=gcc-4.8 -DCMAKE_CXX_COMPILER=g++-4.8
370+
cmake .. ${{ matrix.make_options_run_mode }} ${{ matrix.make_options_feature }} ${{ matrix.extra_options }} -DCMAKE_C_COMPILER=gcc-4.8 -DCMAKE_CXX_COMPILER=g++-4.8
361371
cmake --build . --config Release --parallel 4
362372
working-directory: wamr/product-mini/platforms/linux
363373

@@ -385,6 +395,22 @@ jobs:
385395
exclude:
386396
- make_options: $MULTI_TIER_JIT_BUILD_OPTIONS
387397
sanitizer: asan
398+
include:
399+
# classic interp doesn't support SIMD
400+
- make_options: $CLASSIC_INTERP_BUILD_OPTIONS
401+
extra_options: "-DWAMR_BUILD_SIMD=0"
402+
# fast jit doesn't support Multi-module and SIMD
403+
- make_options: $FAST_JIT_BUILD_OPTIONS
404+
extra_options: "-DWAMR_BUILD_SIMD=0 -DWAMR_BUILD_MULTI_MODULE=0"
405+
# multi-tier jit doesn't support Multi-module and SIMD
406+
- make_options: $MULTI_TIER_JIT_BUILD_OPTIONS
407+
extra_options: "-DWAMR_BUILD_SIMD=0 -DWAMR_BUILD_MULTI_MODULE=0"
408+
# LLVM JIT doesn't support Multi-module
409+
- make_options: $LLVM_LAZY_JIT_BUILD_OPTIONS
410+
extra_options: "-DWAMR_BUILD_MULTI_MODULE=0"
411+
- make_options: $LLVM_EAGER_JIT_BUILD_OPTIONS
412+
extra_options: "-DWAMR_BUILD_MULTI_MODULE=0"
413+
388414
steps:
389415
- name: checkout
390416
uses: actions/checkout@v5
@@ -422,7 +448,7 @@ jobs:
422448
- name: Build Sample [wasm-c-api]
423449
run: |
424450
VERBOSE=1
425-
cmake -S . -B build ${{ matrix.make_options }} \
451+
cmake -S . -B build ${{ matrix.make_options }} ${{ matrix.extra_options }} \
426452
-D WAMR_BUILD_SANITIZER="${{matrix.sanitizer}}" \
427453
-D WAMR_BUILD_QUICK_AOT_ENTRY=0
428454
cmake --build build --config Release --parallel 4

build-scripts/unsupported_combination.cmake

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,16 @@ if(WAMR_BUILD_EXCE_HANDLING EQUAL 1)
7070
check_llvm_jit_error("Unsupported build configuration: EXCE_HANDLING + JIT")
7171
endif()
7272

73+
if(WAMR_BUILD_GC EQUAL 1)
74+
check_fast_jit_error("Unsupported build configuration: GC + FAST_JIT")
75+
endif()
76+
7377
if(WAMR_BUILD_MEMORY64 EQUAL 1)
7478
check_fast_interp_error("Unsupported build configuration: MEMORY64 + FAST_INTERP")
7579
check_fast_jit_error("Unsupported build configuration: MEMORY64 + FAST_JIT")
7680
check_llvm_jit_error("Unsupported build configuration: MEMORY64 + JIT")
7781
endif()
7882

79-
if(WAMR_BUILD_GC EQUAL 1)
80-
check_fast_jit_error("Unsupported build configuration: GC + FAST_JIT")
81-
endif()
82-
8383
if(WAMR_BUILD_MULTI_MEMORY EQUAL 1)
8484
check_aot_mode_error("Unsupported build configuration: EXCE_HANDLING + AOT")
8585
check_fast_interp_error("Unsupported build configuration: EXCE_HANDLING + FAST_INTERP")
@@ -92,11 +92,11 @@ if(WAMR_BUILD_MULTI_MODULE EQUAL 1)
9292
check_llvm_jit_error("Unsupported build configuration: MULTI_MODULE + JIT")
9393
endif()
9494

95+
if(WAMR_BUILD_SHARED_HEAP EQUAL 1)
96+
check_fast_jit_error("Unsupported build configuration: SHARED_HEAP + FAST_JIT")
97+
endif()
98+
9599
if(WAMR_BUILD_SIMD EQUAL 1)
96100
check_classic_interp_error("Unsupported build configuration: SIMD + CLASSIC_INTERP")
97101
check_fast_jit_error("Unsupported build configuration: SIMD + FAST_JIT")
98102
endif()
99-
100-
if(WAMR_BUILD_SHARED_HEAP EQUAL 1)
101-
check_fast_jit_error("Unsupported build configuration: SHARED_HEAP + FAST_JIT")
102-
endif()

0 commit comments

Comments
 (0)