From cfa647c9fb0474687014de8d3f0b6c9f0d56a88b Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 19 Nov 2019 17:05:22 -0800 Subject: Add a --strip-dwarf pass (#2454) This pass strips DWARF debug sections, but not other debug sections. This is useful when emitting source maps, as we do need the SourceMapURL section, but the DWARF sections are not longer necessary (and we've seen a testcase where they are massively large, so big the wasm can't even be loaded in a browser...). Also contains a trivial one-line fix in --extract-function which was necessary to create the testcase here: that pass extracts a function from a wasm file (like llvm-extract) but it didn't check if an export already existed for the function. --- test/passes/strip-dwarf.wasm | Bin 0 -> 843 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test/passes/strip-dwarf.wasm (limited to 'test/passes/strip-dwarf.wasm') diff --git a/test/passes/strip-dwarf.wasm b/test/passes/strip-dwarf.wasm new file mode 100644 index 000000000..b9c7378e8 Binary files /dev/null and b/test/passes/strip-dwarf.wasm differ -- cgit v1.2.3