This is an archive of the discontinued LLVM Phabricator instance.

[lld][WebAssembly] Add new `--import-undefined` option
ClosedPublic

Authored by sbc100 on May 27 2021, 3:55 PM.

Details

Summary

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 one
the reviewers IIRC) that this option can be orthogonal.

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.

Diff Detail

Event Timeline

sbc100 created this revision.May 27 2021, 3:55 PM
sbc100 requested review of this revision.May 27 2021, 3:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 27 2021, 3:55 PM
sbc100 edited the summary of this revision. (Show Details)Jun 1 2021, 11:38 AM
sbc100 edited the summary of this revision. (Show Details)
dschuff accepted this revision.Jun 17 2021, 11:40 AM
dschuff added inline comments.
lld/docs/WebAssembly.rst
76

is this missing a ` character or phab's markdown rendering just confused?

This revision is now accepted and ready to land.Jun 17 2021, 11:40 AM
This revision was automatically updated to reflect the committed changes.