Skip to content

Commit

Permalink
wasm: Pass --no-demangle to LLD
Browse files Browse the repository at this point in the history
Our mangling scheme is not C++'s, so tell LLD to not demangle anything
so we can handle Rust-specific demangling ourselves.
  • Loading branch information
alexcrichton committed Nov 9, 2018
1 parent 4d4a4e7 commit 67053e5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/librustc_codegen_utils/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,11 @@ impl<'a> Linker for WasmLd<'a> {
// indicative of bugs, let's prevent them.
self.cmd.arg("--fatal-warnings");

// 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.
self.cmd.arg("--no-demangle");

let mut cmd = Command::new("");
::std::mem::swap(&mut cmd, &mut self.cmd);
cmd
Expand Down

0 comments on commit 67053e5

Please sign in to comment.