Skip to content

Commit 5ca926f

Browse files
committed
Check that the right version of Binaryen tools are in the path when building
1 parent 9ea1891 commit 5ca926f

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

runtime/wasm/dune

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77
(target runtime.wasm)
88
(deps args (glob_files *.wat))
99
(action
10-
(pipe-stdout
11-
(run wasm-merge -g --enable-gc --enable-exception-handling --enable-reference-types --enable-tail-call --enable-strings --enable-multivalue --enable-bulk-memory %{read-lines:args} -o -)
12-
(run wasm-opt -g --enable-gc --enable-exception-handling --enable-reference-types --enable-tail-call --enable-strings --enable-multivalue --enable-bulk-memory - -O3 -o %{target}))))
10+
(progn
11+
(system "which wasm-merge > /dev/null || (echo 'Error: Binaryen tools not found in the PATH'; false)")
12+
(system "wasm-merge --version | grep -q 'version 116' || (echo 'Error: Binaryen version 116 is currently required'; false)")
13+
(pipe-stdout
14+
(run wasm-merge -g --enable-gc --enable-exception-handling --enable-reference-types --enable-tail-call --enable-strings --enable-multivalue --enable-bulk-memory %{read-lines:args} -o -)
15+
(run wasm-opt -g --enable-gc --enable-exception-handling --enable-reference-types --enable-tail-call --enable-strings --enable-multivalue --enable-bulk-memory - -O3 -o %{target})))))
1316

1417
(rule (target args)
1518
(deps args.ml (glob_files *.wat))

0 commit comments

Comments
 (0)