@@ -167,16 +167,61 @@ if (NOT DEFINED WAMR_BUILD_SHRUNK_MEMORY)
167
167
set (WAMR_BUILD_SHRUNK_MEMORY 1)
168
168
endif ()
169
169
170
+ ########################################
171
+ # Default values
172
+ ########################################
173
+ if (NOT DEFINED WAMR_BUILD_BULK_MEMORY)
174
+ set (WAMR_BUILD_BULK_MEMORY 1)
175
+ endif ()
176
+
177
+ if (NOT DEFINED WAMR_BUILD_EXCE_HANDLING)
178
+ set (WAMR_BUILD_EXCE_HANDLING 0)
179
+ endif ()
180
+
181
+ if (NOT DEFINED WAMR_BUILD_GC)
182
+ set (WAMR_BUILD_GC 0)
183
+ endif ()
184
+
185
+ if (NOT DEFINED WAMR_BUILD_MEMORY64)
186
+ set (WAMR_BUILD_MEMORY64 0)
187
+ endif ()
188
+
189
+ if (NOT DEFINED WAMR_BUILD_MULTI_MEMORY)
190
+ set (WAMR_BUILD_MULTI_MEMORY 0)
191
+ endif ()
192
+
193
+ if (NOT DEFINED WAMR_BUILD_SHARED_MEMORY)
194
+ set (WAMR_BUILD_SHARED_MEMORY 0)
195
+ endif ()
196
+
197
+ if (NOT DEFINED WAMR_BUILD_STRINGREF)
198
+ set (WAMR_BUILD_STRINGREF 0)
199
+ endif ()
200
+
201
+ if (NOT DEFINED WAMR_BUILD_TAIL_CALL)
202
+ set (WAMR_BUILD_TAIL_CALL 0)
203
+ endif ()
204
+
205
+ ########################################
206
+ # Compilation options to marco
170
207
########################################
171
208
172
209
message ("-- Build Configurations:" )
173
210
message (" Build as target ${WAMR_BUILD_TARGET} " )
174
211
message (" CMAKE_BUILD_TYPE " ${CMAKE_BUILD_TYPE} )
212
+ ################## running mode ##################
175
213
if (WAMR_BUILD_INTERP EQUAL 1)
176
214
message (" WAMR Interpreter enabled" )
177
215
else ()
178
216
message (" WAMR Interpreter disabled" )
179
217
endif ()
218
+ if ((WAMR_BUILD_FAST_INTERP EQUAL 1) AND (WAMR_BUILD_INTERP EQUAL 1))
219
+ add_definitions (-DWASM_ENABLE_FAST_INTERP=1)
220
+ message (" Fast interpreter enabled" )
221
+ else ()
222
+ add_definitions (-DWASM_ENABLE_FAST_INTERP=0)
223
+ message (" Fast interpreter disabled" )
224
+ endif ()
180
225
if (WAMR_BUILD_AOT EQUAL 1)
181
226
message (" WAMR AOT enabled" )
182
227
else ()
@@ -207,6 +252,16 @@ if (WAMR_BUILD_FAST_JIT EQUAL 1 AND WAMR_BUILD_JIT EQUAL 1
207
252
AND WAMR_BUILD_LAZY_JIT EQUAL 1)
208
253
message (" Multi-tier JIT enabled" )
209
254
endif ()
255
+ ################## test modes ##################
256
+ if (WAMR_BUILD_SPEC_TEST EQUAL 1)
257
+ add_definitions (-DWASM_ENABLE_SPEC_TEST=1)
258
+ message (" spec test compatible mode is on" )
259
+ endif ()
260
+ if (WAMR_BUILD_WASI_TEST EQUAL 1)
261
+ add_definitions (-DWASM_ENABLE_WASI_TEST=1)
262
+ message (" wasi test compatible mode is on" )
263
+ endif ()
264
+ ################## native ##################
210
265
if (WAMR_BUILD_LIBC_BUILTIN EQUAL 1)
211
266
message (" Libc builtin enabled" )
212
267
else ()
@@ -219,38 +274,36 @@ elseif (WAMR_BUILD_LIBC_WASI EQUAL 1)
219
274
else ()
220
275
message (" Libc WASI disabled" )
221
276
endif ()
222
- if ((WAMR_BUILD_FAST_INTERP EQUAL 1) AND (WAMR_BUILD_INTERP EQUAL 1))
223
- add_definitions (-DWASM_ENABLE_FAST_INTERP=1)
224
- message (" Fast interpreter enabled" )
225
- else ()
226
- add_definitions (-DWASM_ENABLE_FAST_INTERP=0)
227
- message (" Fast interpreter disabled" )
277
+ if (WAMR_BUILD_THREAD_MGR EQUAL 1)
278
+ message (" Thread manager enabled" )
279
+ endif ()
280
+ if (WAMR_BUILD_LIB_PTHREAD EQUAL 1)
281
+ message (" Lib pthread enabled" )
228
282
endif ()
283
+ if (WAMR_BUILD_LIB_PTHREAD_SEMAPHORE EQUAL 1)
284
+ message (" Lib pthread semaphore enabled" )
285
+ endif ()
286
+ if (WAMR_BUILD_LIB_WASI_THREADS EQUAL 1)
287
+ message (" Lib wasi-threads enabled" )
288
+ endif ()
289
+ if (WAMR_BUILD_LIBC_EMCC EQUAL 1)
290
+ message (" Libc emcc enabled" )
291
+ endif ()
292
+ if (WAMR_BUILD_LIB_RATS EQUAL 1)
293
+ message (" Lib rats enabled" )
294
+ endif ()
295
+ ################## WAMR features ##################
229
296
if (WAMR_BUILD_MULTI_MODULE EQUAL 1)
230
297
add_definitions (-DWASM_ENABLE_MULTI_MODULE=1)
231
298
message (" Multiple modules enabled" )
232
299
else ()
233
300
add_definitions (-DWASM_ENABLE_MULTI_MODULE=0)
234
301
message (" Multiple modules disabled" )
235
302
endif ()
236
- if (WAMR_BUILD_SPEC_TEST EQUAL 1)
237
- add_definitions (-DWASM_ENABLE_SPEC_TEST=1)
238
- message (" spec test compatible mode is on" )
239
- endif ()
240
- if (WAMR_BUILD_WASI_TEST EQUAL 1)
241
- add_definitions (-DWASM_ENABLE_WASI_TEST=1)
242
- message (" wasi test compatible mode is on" )
243
- endif ()
244
- if (NOT DEFINED WAMR_BUILD_BULK_MEMORY)
245
- # Enable bulk memory by default
246
- set (WAMR_BUILD_BULK_MEMORY 1)
247
- endif ()
248
303
if (WAMR_BUILD_BULK_MEMORY EQUAL 1)
249
304
add_definitions (-DWASM_ENABLE_BULK_MEMORY=1)
250
- message (" Bulk memory feature enabled" )
251
305
else ()
252
306
add_definitions (-DWASM_ENABLE_BULK_MEMORY=0)
253
- message (" Bulk memory feature disabled" )
254
307
endif ()
255
308
if (WAMR_BUILD_SHARED_MEMORY EQUAL 1)
256
309
add_definitions (-DWASM_ENABLE_SHARED_MEMORY=1)
@@ -270,31 +323,11 @@ if (WAMR_BUILD_MEMORY64 EQUAL 1)
270
323
endif ()
271
324
add_definitions (-DWASM_ENABLE_MEMORY64=1)
272
325
set (WAMR_DISABLE_HW_BOUND_CHECK 1)
273
- message (" Memory64 memory enabled" )
274
326
endif ()
275
327
if (WAMR_BUILD_MULTI_MEMORY EQUAL 1)
276
328
add_definitions (-DWASM_ENABLE_MULTI_MEMORY=1)
277
- message (" Multi memory enabled" )
278
329
set (WAMR_BUILD_DEBUG_INTERP 0)
279
330
endif ()
280
- if (WAMR_BUILD_THREAD_MGR EQUAL 1)
281
- message (" Thread manager enabled" )
282
- endif ()
283
- if (WAMR_BUILD_LIB_PTHREAD EQUAL 1)
284
- message (" Lib pthread enabled" )
285
- endif ()
286
- if (WAMR_BUILD_LIB_PTHREAD_SEMAPHORE EQUAL 1)
287
- message (" Lib pthread semaphore enabled" )
288
- endif ()
289
- if (WAMR_BUILD_LIB_WASI_THREADS EQUAL 1)
290
- message (" Lib wasi-threads enabled" )
291
- endif ()
292
- if (WAMR_BUILD_LIBC_EMCC EQUAL 1)
293
- message (" Libc emcc enabled" )
294
- endif ()
295
- if (WAMR_BUILD_LIB_RATS EQUAL 1)
296
- message (" Lib rats enabled" )
297
- endif ()
298
331
if (WAMR_BUILD_MINI_LOADER EQUAL 1)
299
332
add_definitions (-DWASM_ENABLE_MINI_LOADER=1)
300
333
message (" WASM mini loader enabled" )
@@ -324,7 +357,6 @@ endif ()
324
357
if (WAMR_BUILD_SIMD EQUAL 1)
325
358
if (NOT WAMR_BUILD_TARGET MATCHES "RISCV64.*" )
326
359
add_definitions (-DWASM_ENABLE_SIMD=1)
327
- message (" SIMD enabled" )
328
360
else ()
329
361
message (" SIMD disabled due to not supported on target RISCV64" )
330
362
endif ()
@@ -354,16 +386,11 @@ if (WAMR_BUILD_DUMP_CALL_STACK EQUAL 1)
354
386
endif ()
355
387
if (WAMR_BUILD_TAIL_CALL EQUAL 1)
356
388
add_definitions (-DWASM_ENABLE_TAIL_CALL=1)
357
- message (" Tail call enabled" )
358
389
endif ()
359
390
if (WAMR_BUILD_REF_TYPES EQUAL 1)
360
391
add_definitions (-DWASM_ENABLE_REF_TYPES=1)
361
- message (" Reference types enabled" )
362
- else ()
363
- message (" Reference types disabled" )
364
392
endif ()
365
393
if (WAMR_BUILD_GC EQUAL 1)
366
- message (" GC enabled" )
367
394
if (WAMR_TEST_GC EQUAL 1)
368
395
message (" GC testing enabled" )
369
396
endif ()
@@ -375,7 +402,6 @@ else ()
375
402
message (" GC performance profiling disabled" )
376
403
endif ()
377
404
if (WAMR_BUILD_STRINGREF EQUAL 1)
378
- message (" Stringref enabled" )
379
405
if (NOT DEFINED WAMR_STRINGREF_IMPL_SOURCE)
380
406
message (" Using WAMR builtin implementation for stringref" )
381
407
else ()
@@ -615,3 +641,36 @@ if (WAMR_BUILD_AOT_VALIDATOR EQUAL 1)
615
641
message (" AOT validator enabled" )
616
642
add_definitions (-DWASM_ENABLE_AOT_VALIDATOR=1)
617
643
endif ()
644
+
645
+ ########################################
646
+ # Show Phase4 Wasm proposals status.
647
+ ########################################
648
+
649
+ message (
650
+ "-- About Wasm Proposals:\n "
651
+ " Always-on:\n "
652
+ " \" Extended Constant Expressions\"\n "
653
+ " \" Multi-value\"\n "
654
+ " \" Non-trapping float-to-int conversions\"\n "
655
+ " \" Sign-extension operators\"\n "
656
+ " \" WebAssembly C and C++ API\"\n "
657
+ " Configurable. 0 is OFF. 1 is ON:\n "
658
+ " \" Bulk Memory Operation\" via WAMR_BUILD_BULK_MEMORY: ${WAMR_BUILD_BULK_MEMORY} \n "
659
+ " \" Fixed-width SIMD\" via WAMR_BUILD_SIMD: ${WAMR_BUILD_SIMD} \n "
660
+ " \" Garbage collection\" via WAMR_BUILD_GC: ${WAMR_BUILD_GC} \n "
661
+ " \" Legacy Exception handling\" via WAMR_BUILD_EXCE_HANDLING: ${WAMR_BUILD_EXCE_HANDLING} \n "
662
+ " \" Memory64\" via WAMR_BUILD_MEMORY64: ${WAMR_BUILD_MEMORY64} \n "
663
+ " \" Multiple memories\" via WAMR_BUILD_MULTI_MEMORY: ${WAMR_BUILD_MULTI_MEMORY} \n "
664
+ " \" Reference Types\" via WAMR_BUILD_REF_TYPES: ${WAMR_BUILD_REF_TYPES} \n "
665
+ " \" Reference-Typed Strings\" via WAMR_BUILD_STRINGREF: ${WAMR_BUILD_STRINGREF} \n "
666
+ " \" Tail call\" via WAMR_BUILD_TAIL_CALL: ${WAMR_BUILD_TAIL_CALL} \n "
667
+ " \" Threads\" via WAMR_BUILD_SHARED_MEMORY: ${WAMR_BUILD_SHARED_MEMORY} \n "
668
+ " \" Typed Function References\" via WAMR_BUILD_GC: ${WAMR_BUILD_GC} \n "
669
+ " Unsupported (>= Phase4):\n "
670
+ " \" Branch Hinting\"\n "
671
+ " \" Custom Annotation Syntax in the Text Format\"\n "
672
+ " \" Exception handling\"\n "
673
+ " \" Import/Export of Mutable Globals\"\n "
674
+ " \" JS String Builtins\"\n "
675
+ " \" Relaxed SIMD\"\n "
676
+ )
0 commit comments