-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.config
51 lines (38 loc) · 1.69 KB
/
make.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Default stack size
DEFAULT_STACK_SIZE?=2097152
ASYNCIFY_DEFAULT_STACK_SIZE?=$(DEFAULT_STACK_SIZE)
WASMFX_CONT_TABLE_INITIAL_CAPACITY?=1024
# Mimalloc (drop-in replacement for malloc)
MIMALLOC=../mimalloc-2.1.2/release/out/libmimalloc.so
# WASI SDK C/C++ compiler
WASICC?=../wasi-sdk-22.0/bin/clang
WASICC_FLAGS=--std=c17 -O3 -Wall -Wextra -Werror -DASYNCIFY_DEFAULT_STACK_SIZE=$(ASYNCIFY_DEFAULT_STACK_SIZE)
# Wabt
WABTFX_FLAGS=--enable-multimemory --enable-exception-handling --enable-reference-types --enable-multivalue --enable-bulk-memory --enable-gc --enable-typed-continuations
## Wasm optimiser
WASM_OPT?=../binaryenfx/bin/wasm-opt
WASM_OPT_FLAGS=-O2
WASMFX_OPT=$(WASM_OPT) $(WASM_OPT_FLAGS) $(WABTFX_FLAGS)
# Binaryen IR text format assembler
WASM_AS?=../binaryenfx/bin/wasm-as
WASMFX_AS=$(WASM_AS) $(WABTFX_FLAGS)
# Binaryen IR text format disassembler
WASM_DIS?=../binaryenfx/bin/wasm-dis
WASMFX_DIS=$(WASM_DIS) $(WABTFX_FLAGS)
## Asyncify compiler from WABT
ASYNCIFY=$(WASM_OPT) $(WASM_OPT_FLAGS) --asyncify --pass-arg=asyncify-ignore-imports
## Wasm module merger
WASM_MERGE?=../binaryenfx/bin/wasm-merge
WASMFX_MERGE=$(WASM_MERGE) $(WABTFX_FLAGS)
# Wasmtime engine
WASMTIME=../wasmtime/target/release/wasmtime
WASMTIMEC=$(WASMTIME) compile
WASMTIMEC_RUN=LD_PRELOAD=$(MIMALLOC) $(WASMTIME) --allow-precompiled -Wwasmfx-stack-size=$(DEFAULT_STACK_SIZE) -Wwasmfx-red-zone-size=0
# WasmFX enabled Wasmtime engine
WASMTIMEFX_FLAGS=-W=exceptions,function-references,typed-continuations
WASMFXTIMEC=$(WASMTIMEC) $(WASMTIMEFX_FLAGS)
WASMFXTIMEC_RUN=$(WASMTIMEC_RUN) $(WASMTIMEFX_FLAGS)
# WasmFX reference interpreter
WASM_INTERP?=../spec/interpreter/wasm
# Hyperfine measurement tool
HYPERFINE=hyperfine --warmup 3