summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Graey <maxgraey@gmail.com>2022-07-14 18:31:27 +0300
committerGitHub <noreply@github.com>2022-07-14 08:31:27 -0700
commit4e9f216a1ceae8bc4111fd68bda9fb681e1eeca1 (patch)
treec91a08a15e0db130d8b1b2ac393777b5af5a90a4
parentadde087245c8c7b072534cfaaa461dc364dae4d3 (diff)
downloadbinaryen-4e9f216a1ceae8bc4111fd68bda9fb681e1eeca1.tar.gz
binaryen-4e9f216a1ceae8bc4111fd68bda9fb681e1eeca1.tar.bz2
binaryen-4e9f216a1ceae8bc4111fd68bda9fb681e1eeca1.zip
Enable sign-extension & bulk-memory features for binaryen.js builds (#4804)
Also document minimal requirements for binaryen.js
-rw-r--r--CMakeLists.txt2
-rw-r--r--README.md8
2 files changed, 6 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 41c742943..c8b755e87 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -408,6 +408,8 @@ if(EMSCRIPTEN)
target_link_libraries(binaryen_wasm "-sEXPORTED_RUNTIME_METHODS=allocate")
target_link_libraries(binaryen_wasm "--post-js ${CMAKE_CURRENT_SOURCE_DIR}/src/js/binaryen.js-post.js")
target_link_libraries(binaryen_wasm "--extern-pre-js ${CMAKE_CURRENT_SOURCE_DIR}/src/js/binaryen.js-extern-pre.js")
+ target_link_libraries(binaryen_wasm "-msign-ext")
+ target_link_libraries(binaryen_wasm "-mbulk-memory")
target_link_libraries(binaryen_wasm optimized "--closure 1")
target_link_libraries(binaryen_wasm optimized "--closure-args \"--language_in=ECMASCRIPT6 --language_out=ECMASCRIPT6\"")
target_link_libraries(binaryen_wasm optimized "-flto")
diff --git a/README.md b/README.md
index 84dd27481..dd5386527 100644
--- a/README.md
+++ b/README.md
@@ -204,7 +204,7 @@ This repository contains code that builds the following tools in `bin/`:
performs emscripten-specific passes over it.
* **wasm-ctor-eval**: A tool that can execute functions (or parts of functions)
at compile time.
- * **binaryen.js**: A standalone JavaScript library that exposes Binaryen methods for [creating and optimizing Wasm modules](https://github.com/WebAssembly/binaryen/blob/main/test/binaryen.js/hello-world.js). For builds, see [binaryen.js on npm](https://www.npmjs.com/package/binaryen) (or download it directly from [github](https://raw.githubusercontent.com/AssemblyScript/binaryen.js/master/index.js), [rawgit](https://cdn.rawgit.com/AssemblyScript/binaryen.js/master/index.js), or [unpkg](https://unpkg.com/binaryen@latest/index.js)).
+ * **binaryen.js**: A standalone JavaScript library that exposes Binaryen methods for [creating and optimizing Wasm modules](https://github.com/WebAssembly/binaryen/blob/main/test/binaryen.js/hello-world.js). For builds, see [binaryen.js on npm](https://www.npmjs.com/package/binaryen) (or download it directly from [github](https://raw.githubusercontent.com/AssemblyScript/binaryen.js/master/index.js), [rawgit](https://cdn.rawgit.com/AssemblyScript/binaryen.js/master/index.js), or [unpkg](https://unpkg.com/binaryen@latest/index.js)). Minimal requirements: Node.js v15.8 or Chrome v75 or Firefox v78.
Usage instructions for each are below.
@@ -561,9 +561,9 @@ The `check.py` script supports some options:
tool cannot be found, and you'll see a warning.
* We have tests from upstream in `tests/spec`, in git submodules. Running
`./check.py` should update those.
-
+
Note that we are trying to gradually port the legacy wasm-opt tests to use `lit` and `filecheck` as we modify them.
-For `passes` tests that output wast, this can be done automatically with `scripts/port_passes_tests_to_lit.py` and for non-`passes` tests that output wast, see
+For `passes` tests that output wast, this can be done automatically with `scripts/port_passes_tests_to_lit.py` and for non-`passes` tests that output wast, see
https://github.com/WebAssembly/binaryen/pull/4779 for an example of how to do a simple manual port.
### Setting up dependencies
@@ -615,7 +615,7 @@ Emscripten's WebAssembly processing library (`wasm-emscripten`).
* Does it compile under Windows and/or Visual Studio?
Yes, it does. Here's a step-by-step [tutorial][win32] on how to compile it
-under **Windows 10 x64** with with **CMake** and **Visual Studio 2015**.
+under **Windows 10 x64** with with **CMake** and **Visual Studio 2015**.
However, Visual Studio 2017 may now be required. Help would be appreciated on
Windows and OS X as most of the core devs are on Linux.