[PATCH] D54279: wasm32: Respect `--no-mangle` in more locations in LLD

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 8 16:04:46 PST 2018


sbc100 added a comment.

Hmm, I wonder if you want to include rust-style demangling in lld directly?

>From the GNU ld man page:

  --demangle[=style]
   --no-demangle
       These options control whether to demangle symbol names in error messages and other output.  When the linker is told to
       demangle, it tries to present symbol names in a readable fashion: it strips leading underscores if they are used by the
       object file format, and converts C++ mangled symbol names into user readable names.  Different compilers have different
       mangling styles.  The optional demangling style argument can be used to choose an appropriate demangling style for your
       compiler.  The linker will demangle by default unless the environment variable COLLECT_NO_DEMANGLE is set.  These options
       may be used to override the default.

Sounds like to could add a "style" for rust maybe?

Either way, having though about it, I think we should accept this patch since saying `--no-demangle` is basically telling the linker its not smart enough to demangle by default, in which case the names section would look wrong too.    Did you run the tests?  If nothing failed with this change it points to the fact that we probably need more coverage :)   lgtm, with a test.


https://reviews.llvm.org/D54279





More information about the llvm-commits mailing list