[llvm-bugs] [Bug 45602] New: [WebAssembly] wasm-opt strips symbol names when optimizing

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Apr 18 13:44:47 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=45602

            Bug ID: 45602
           Summary: [WebAssembly] wasm-opt strips symbol names when
                    optimizing
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Driver
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jgravelle at google.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

If wasm-opt is present on PATH, it is automatically invoked after wasm-ld. It
reuses the -Ox flag from clang to determine its optimization level. Anything
other than -O0 leads to wasm-opt stripping the names section. This makes
debugging an optimized build more awkward.

`clang foo.cpp -g -O1 -o foo.wasm --target=wasm32 -v` does not have a names
section
`clang foo.cpp -g -O0 -o foo.wasm --target=wasm32 -v` does still have symbols

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200418/24d8f988/attachment.html>


More information about the llvm-bugs mailing list