diff options
author | Alon Zakai <alonzakai@gmail.com> | 2018-12-03 15:35:35 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-03 15:35:35 -0800 |
commit | d53c64875ff0367dbc28ccea3d3299809fd8ee36 (patch) | |
tree | 770e88d288355451fe1db3bbaebbb27c0532fecd /src/passes/pass.cpp | |
parent | 3d98b5bb767a2bacf791ad000e75d4ed8df1a385 (diff) | |
download | binaryen-d53c64875ff0367dbc28ccea3d3299809fd8ee36.tar.gz binaryen-d53c64875ff0367dbc28ccea3d3299809fd8ee36.tar.bz2 binaryen-d53c64875ff0367dbc28ccea3d3299809fd8ee36.zip |
Add --strip that removes debug info (#1787)
This is sort of like --strip on a native binary. The more specific use case for us is e.g. you link with a library that has -g in its CFLAGS, but you don't want debug info in your final executable (I hit this with poppler now). We can make emcc pass this to binaryen if emcc is not building an output with intended debug info.
Diffstat (limited to 'src/passes/pass.cpp')
-rw-r--r-- | src/passes/pass.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/passes/pass.cpp b/src/passes/pass.cpp index d2478eaba..e89fed83f 100644 --- a/src/passes/pass.cpp +++ b/src/passes/pass.cpp @@ -131,6 +131,7 @@ 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("trap-mode-clamp", "replace trapping operations with clamping semantics", createTrapModeClamp); registerPass("trap-mode-js", "replace trapping operations with js semantics", createTrapModeJS); registerPass("untee", "removes tee_locals, replacing them with sets and gets", createUnteePass); |