Skip to content

Commit

Permalink
rustc: Disable threads in LLD for wasm
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alexcrichton committed Apr 26, 2018
1 parent 84ce67e commit a2a9cc6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/librustc_trans/back/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,11 @@ impl Linker for WasmLd {
}

fn finalize(&mut self) -> Command {
self.cmd.arg("--threads");
// There have been reports in the wild (rustwasm/wasm-bindgen#119) of
// using threads causing weird hangs and bugs. Disable it entirely as
// this isn't yet the bottleneck of compilation at all anyway.
self.cmd.arg("--no-threads");

self.cmd.arg("-z").arg("stack-size=1048576");

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

0 comments on commit a2a9cc6

Please sign in to comment.