[PATCH] D103290: [lld][WebAssembly] Add new `--import-undefined` option

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 27 15:55:08 PDT 2021


sbc100 created this revision.
Herald added subscribers: wingo, dang, ecnelises, sunfish, jgravelle-google, dschuff.
Herald added a reviewer: MaskRay.
sbc100 requested review of this revision.
Herald added subscribers: llvm-commits, aheejin.
Herald added a project: LLVM.

This change revisits https://reviews.llvm.org/D79248 which originally
added support for the --unresolved-symbols flag.

At the time I thought it would make sense to add a third option to this
flag called `import-functions` but it turns out (as was suspects by on
the reviewers IIRC) that this option can be authoganal.

Instead I've added a new option called `--import-undefined` that only
operates on symbols that can be imported (for example, function symbols
can always be imported as opposed to data symbols we can only be
imported when compiling with PIC).

This option gives us the full expresivitiy that emscripten needs to be
able allow reporting of undefined data symbols as well as the option to
disable that.

This change does remove the `--unresolved-symbols=import-functions`
option, which is been in the codebase now for about a year but I would
be extremely surprised if anyone was using it.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103290

Files:
  lld/docs/WebAssembly.rst
  lld/test/wasm/unresolved-symbols.s
  lld/wasm/Config.h
  lld/wasm/Driver.cpp
  lld/wasm/Options.td
  lld/wasm/Relocations.cpp
  lld/wasm/Writer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103290.348409.patch
Type: text/x-patch
Size: 9797 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210527/04fa9c4c/attachment.bin>


More information about the llvm-commits mailing list