Skip to content

Commit 67053e5

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 4d4a4e7 commit 67053e5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/librustc_codegen_utils/linker.rs

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

1088+
// LLD only implements C++-like demangling, which doesn't match our own
1089+
// mangling scheme. Tell LLD to not demangle anything and leave it up to
1090+
// us to demangle these symbols later.
1091+
self.cmd.arg("--no-demangle");
1092+
10881093
let mut cmd = Command::new("");
10891094
::std::mem::swap(&mut cmd, &mut self.cmd);
10901095
cmd

0 commit comments

Comments
 (0)