diff options
author | Derek Schuff <dschuff@chromium.org> | 2017-10-27 09:20:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-27 09:20:01 -0700 |
commit | 2e51491a15914c5ba7eff9afeaaee8f998e82ede (patch) | |
tree | 23116b52d6cfaaa35ef97ccb94752b8abf9f289e /src/tools/wasm-as.cpp | |
parent | 9d409e10f5fc6188e4b774e6b757ab25dfabefed (diff) | |
download | binaryen-2e51491a15914c5ba7eff9afeaaee8f998e82ede.tar.gz binaryen-2e51491a15914c5ba7eff9afeaaee8f998e82ede.tar.bz2 binaryen-2e51491a15914c5ba7eff9afeaaee8f998e82ede.zip |
Add Features enum to IR (#1250)
This enum describes which wasm features the IR is expected to include. The
validator should reject operations which require excluded features, and passes
should avoid producing IR which requires excluded features.
This makes it easier to catch possible errors in Binaryen producers (e.g.
emscripten). Asm2wasm has a flag to enable or disable atomics. Other
tools currently just accept all features (as, dis and opt are just for
inspecting or modifying existing modules, so it would be annoying to have to use
flags with those tools and I expect the risk of accidentally introducing
atomics to be low).
Diffstat (limited to 'src/tools/wasm-as.cpp')
-rw-r--r-- | src/tools/wasm-as.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/wasm-as.cpp b/src/tools/wasm-as.cpp index 956ad213f..d456f43fd 100644 --- a/src/tools/wasm-as.cpp +++ b/src/tools/wasm-as.cpp @@ -92,7 +92,7 @@ int main(int argc, const char *argv[]) { if (options.extra["validate"] != "none") { if (options.debug) std::cerr << "Validating..." << std::endl; - if (!wasm::WasmValidator().validate(wasm, + if (!wasm::WasmValidator().validate(wasm, Feature::All, WasmValidator::Globally | (options.extra["validate"] == "web" ? WasmValidator::Web : 0))) { Fatal() << "Error: input module is not valid.\n"; } |