This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Add --[no]-export-dynamic to replace --export-default
ClosedPublic

Authored by sbc100 on Sep 26 2018, 6:47 PM.

Details

Summary

In a very recent change I introduced a --no-export-default flag
but after conferring with others it seems that this feature already
exists in gnu GNU ld and lld in the form the --export-dynamic flag
which is off by default.

This change replaced export-default with export-dynamic and also
changes the default to match the traditional linker behaviour.

Now, by default only the entry point is exported. If other symbols
are required by the embedder then --export-dynamic or --export can
be used to export either all visibility hidden symbols or individual
symbols respectively.

This change touches a lot of tests that were relying on synmbols
being exported by default. I imagine it will also effect many
users but do think the change is worth it match of the traditional
behaviour and flag names.

Diff Detail

Repository
rL LLVM

Event Timeline

sbc100 created this revision.Sep 26 2018, 6:47 PM
sbc100 edited the summary of this revision. (Show Details)
ruiu accepted this revision.Sep 27 2018, 1:58 PM

LGTM

wasm/Driver.cpp
477 ↗(On Diff #167230)

nit: synthetic

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