Page MenuHomePhabricator

[WebAssembly] Add warnings for -shared and -pie

Authored by sunfish on Jun 12 2020, 12:49 PM.



The meaning of -shared and -pie are expected to be changed in the
future when Module Linking-style libraries are implemented. Begin
issuing warnings to give people a heads-up that they will be changing.

For compatibility with Emscripten, add a --emscripten-pic flag which
disables these warnings.

Diff Detail

Event Timeline

sunfish created this revision.Jun 12 2020, 12:49 PM
sbc100 added inline comments.Jun 12 2020, 2:05 PM

Since this is just a warning and linker will actual produce a binary.. how about something like like : "the shared library is not yet stable"? Or some other wording to that effect.

This wording sounds like it would be hard error and not output anything.


I'm a little loath to explicitly call out emscripten. We could use some term like "experimental" or "v1" or something similar?

Once argument for this the emscripten ABI is actually quite different to the output of lld. We use a binaryen transforms which transforms the lld output, for example it internalizes/removes all the GOT imports that lld generates.

sunfish updated this revision to Diff 273478.Jun 25 2020, 12:14 PM
  • Rename -emscripten-pic to -experimental-pic
  • Change the warning text to say "not stable" rather than "not yet implemented"
sunfish marked 4 inline comments as done.Jun 25 2020, 12:15 PM
sunfish added inline comments.

Changed to say "not yet stable".


Changed to experimental.

sbc100 accepted this revision.Jun 25 2020, 3:41 PM
This revision is now accepted and ready to land.Jun 25 2020, 3:41 PM
This revision was automatically updated to reflect the committed changes.