summaryrefslogtreecommitdiff
path: root/src/passes/pass.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2019-01-31 09:35:32 -0800
committerGitHub <noreply@github.com>2019-01-31 09:35:32 -0800
commitddb5acd34238967a2487a70926849c89f38a35e2 (patch)
tree35be190a17fc8b1d9a0824dd5a4376f46d53c9a0 /src/passes/pass.cpp
parent5f1afa58d22dce1088c63eff690283d8c615feee (diff)
downloadbinaryen-ddb5acd34238967a2487a70926849c89f38a35e2.tar.gz
binaryen-ddb5acd34238967a2487a70926849c89f38a35e2.tar.bz2
binaryen-ddb5acd34238967a2487a70926849c89f38a35e2.zip
Strip the producers section in --strip-producers (#1875)
WebAssembly/tool-conventions#93 has a summary of emscripten's current thinking on this. For Binaryen, we don't want to do anything to the producers section by default, but do want it to be possible to optionally remove it. To achieve that, this PR * creates a --strip-producers pass that removes that section. * creates a --strip-debug pass that removes debug info, same as the old --strip, which is still around but deprecated. A followup in emscripten will use this pass by default.
Diffstat (limited to 'src/passes/pass.cpp')
-rw-r--r--src/passes/pass.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/passes/pass.cpp b/src/passes/pass.cpp
index cae69860a..2872575c2 100644
--- a/src/passes/pass.cpp
+++ b/src/passes/pass.cpp
@@ -133,7 +133,9 @@ void PassRegistry::registerPasses() {
registerPass("souperify-single-use", "emit Souper IR in text form (single-use nodes only)", createSouperifySingleUsePass);
registerPass("spill-pointers", "spill pointers to the C stack (useful for Boehm-style GC)", createSpillPointersPass);
registerPass("ssa", "ssa-ify variables so that they have a single assignment", createSSAifyPass);
- registerPass("strip", "strip debug info (including the names section)", createStripPass);
+ registerPass("strip", "deprecated; same as strip-debug", createStripDebugPass);
+ registerPass("strip-debug", "strip debug info (including the names section)", createStripDebugPass);
+ registerPass("strip-producers", "strip the wasm producers section", createStripProducersPass);
registerPass("trap-mode-clamp", "replace trapping operations with clamping semantics", createTrapModeClamp);
registerPass("trap-mode-js", "replace trapping operations with js semantics", createTrapModeJS);
registerPass("untee", "removes local.tees, replacing them with sets and gets", createUnteePass);