This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Add --export-default/--no-export-default options
ClosedPublic

Authored by sbc100 on Sep 12 2018, 2:09 PM.

Details

Summary

These option control weather or not symbols marked as visibility
default are exported in the output binary.

By default this is true, but emscripten prefers to control the
exported symbol list explicitly at link time and ignore the
symbol attributes.

Diff Detail

Repository
rL LLVM

Event Timeline

sbc100 created this revision.Sep 12 2018, 2:09 PM
sbc100 added a reviewer: ruiu.Sep 12 2018, 2:10 PM
ruiu added a comment.Sep 13 2018, 2:46 PM

Maybe we should handle it as an error if a user passes both --export-all and --export-default?

Hmm, I see what you mean. I thing is that --export-default is the default, so we would need to detect weather it was set from the command or not which would complicate the code a little. Also, all is a superset of default I'm not sure its necessary.

OK to land?

ruiu accepted this revision.Sep 25 2018, 2:07 PM

LGTM

wasm/Options.td
34 ↗(On Diff #165147)

Add "(default)" at the end of this message as this is the default choice.

This revision is now accepted and ready to land.Sep 25 2018, 2:07 PM
This revision was automatically updated to reflect the committed changes.