Skip to content

Commit

Permalink
Check that the right version of Binaryen tools are in the path when b…
Browse files Browse the repository at this point in the history
…uilding
  • Loading branch information
vouillon committed Mar 14, 2024
1 parent 9ea1891 commit 5ca926f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions runtime/wasm/dune
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
(target runtime.wasm)
(deps args (glob_files *.wat))
(action
(pipe-stdout
(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 -)
(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}))))
(progn
(system "which wasm-merge > /dev/null || (echo 'Error: Binaryen tools not found in the PATH'; false)")
(system "wasm-merge --version | grep -q 'version 116' || (echo 'Error: Binaryen version 116 is currently required'; false)")
(pipe-stdout
(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 -)
(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})))))

(rule (target args)
(deps args.ml (glob_files *.wat))
Expand Down

0 comments on commit 5ca926f

Please sign in to comment.