Skip to content

Commit a2a9cc6

Browse files
committed
rustc: Disable threads in LLD for wasm
Upstream bug reports (rustwasm/wasm-bindgen#119) show that this may be the culprit of odd crashes/hangs. The linker is a tiny fraction of build time anyway right now so let's disable it and figure out how to possibly reenable it later if necessary.
1 parent 84ce67e commit a2a9cc6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/librustc_trans/back/linker.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,11 @@ impl Linker for WasmLd {
959959
}
960960

961961
fn finalize(&mut self) -> Command {
962-
self.cmd.arg("--threads");
962+
// There have been reports in the wild (rustwasm/wasm-bindgen#119) of
963+
// using threads causing weird hangs and bugs. Disable it entirely as
964+
// this isn't yet the bottleneck of compilation at all anyway.
965+
self.cmd.arg("--no-threads");
966+
963967
self.cmd.arg("-z").arg("stack-size=1048576");
964968

965969
// FIXME we probably shouldn't pass this but instead pass an explicit

0 commit comments

Comments
 (0)