Skip to content

Commit

Permalink
Pass --export-dynamic to LLD for wasm
Browse files Browse the repository at this point in the history
This should handle recent symbol visibility changes happening, although
we'll likely want to tweak this in the future!
  • Loading branch information
alexcrichton committed Nov 26, 2018
1 parent c86b152 commit cc9c91d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/librustc_codegen_ssa/back/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,12 @@ impl<'a> Linker for WasmLd<'a> {
// indicative of bugs, let's prevent them.
self.cmd.arg("--fatal-warnings");

// The symbol visibility story is a bit in flux right now with LLD.
// It's... not entirely clear to me what's going on, but this looks to
// make everything work when `export_symbols` isn't otherwise called for
// things like executables.
self.cmd.arg("--export-dynamic");

// LLD only implements C++-like demangling, which doesn't match our own
// mangling scheme. Tell LLD to not demangle anything and leave it up to
// us to demangle these symbols later.
Expand Down

0 comments on commit cc9c91d

Please sign in to comment.