This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Add --export-all flag
ClosedPublic

Authored by sbc100 on Jun 5 2018, 6:25 PM.

Details

Summary

This causes all symbols to be exported in the final wasm binary
even if they were not compiled with default visibility.

This feature is useful for the emscripten toolchain that has a
corresponding EXPORT_ALL feature which allows the JS code to
interact with all C function.

Diff Detail

Repository
rL LLVM

Event Timeline

sbc100 created this revision.Jun 5 2018, 6:25 PM
sbc100 updated this revision to Diff 150063.Jun 5 2018, 6:36 PM
  • revert
sbc100 added a comment.Jun 6 2018, 5:34 PM

Gentle ping, this is the last change needed to switch the lld by default in the llvm-backend-enabled emscripten toolchain.

ruiu added inline comments.Jun 6 2018, 6:16 PM
wasm/Writer.cpp
757 ↗(On Diff #150063)

Why? I'd expand this comment a bit so that it includes the background and a future plan.

sbc100 updated this revision to Diff 150240.Jun 6 2018, 6:26 PM
  • feedback
sbc100 marked an inline comment as done.Jun 6 2018, 6:26 PM
ruiu accepted this revision.Jun 6 2018, 6:27 PM
ruiu added inline comments.
wasm/Driver.cpp
408 ↗(On Diff #150240)

nit: implemented

This revision is now accepted and ready to land.Jun 6 2018, 6:27 PM
This revision was automatically updated to reflect the committed changes.