wasm: Pass `--no-demangle` to LLD

Our mangling scheme is not C++'s, so tell LLD to not demangle anything
so we can handle Rust-specific demangling ourselves.
This commit is contained in:
Alex Crichton 2018-11-09 13:51:00 -08:00
parent bf01bcb451
commit c86b1529a5
1 changed files with 5 additions and 0 deletions

View File

@ -1037,6 +1037,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");
::std::mem::replace(&mut self.cmd, Command::new(""))
}