Skip to content

Commit c86b152

Browse files
committed
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.
1 parent bf01bcb commit c86b152

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/librustc_codegen_ssa/back/linker.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1037,6 +1037,11 @@ impl<'a> Linker for WasmLd<'a> {
10371037
// indicative of bugs, let's prevent them.
10381038
self.cmd.arg("--fatal-warnings");
10391039

1040+
// LLD only implements C++-like demangling, which doesn't match our own
1041+
// mangling scheme. Tell LLD to not demangle anything and leave it up to
1042+
// us to demangle these symbols later.
1043+
self.cmd.arg("--no-demangle");
1044+
10401045
::std::mem::replace(&mut self.cmd, Command::new(""))
10411046
}
10421047

0 commit comments

Comments
 (0)