From ddb5acd34238967a2487a70926849c89f38a35e2 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 31 Jan 2019 09:35:32 -0800 Subject: 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. --- test/passes/metrics_strip-debug_metrics.bin.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/passes/metrics_strip-debug_metrics.bin.txt (limited to 'test/passes/metrics_strip-debug_metrics.bin.txt') diff --git a/test/passes/metrics_strip-debug_metrics.bin.txt b/test/passes/metrics_strip-debug_metrics.bin.txt new file mode 100644 index 000000000..dbb3dcc37 --- /dev/null +++ b/test/passes/metrics_strip-debug_metrics.bin.txt @@ -0,0 +1,17 @@ +total + [funcs] : 1 + [total] : 1 + nop : 1 +total + [funcs] : 1 + [total] : 1 + nop : 1 +(module + (type $0 (func)) + (export "a" (func $0)) + (func $0 (; 0 ;) (type $0) + (nop) + ) + ;; custom section "emscripten_metadata", size 7 + ;; custom section "producers", size 187 +) -- cgit v1.2.3