diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2018-04-26 06:56:37 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2018-04-26 06:56:37 -0700 |
| commit | a2a9cc68fe44a4a667dddd01c17b3dcceefb5a5a (patch) | |
| tree | 17f1747ec90e41f2ff839abb026c32458bd10d6c | |
| parent | 84ce67ef950e962d398ca974e39f0b8d4aa103db (diff) | |
| download | rust-a2a9cc68fe44a4a667dddd01c17b3dcceefb5a5a.tar.gz rust-a2a9cc68fe44a4a667dddd01c17b3dcceefb5a5a.zip | |
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.
| -rw-r--r-- | src/librustc_trans/back/linker.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/librustc_trans/back/linker.rs b/src/librustc_trans/back/linker.rs index e001e809ee5..883625a2dd7 100644 --- a/src/librustc_trans/back/linker.rs +++ b/src/librustc_trans/back/linker.rs @@ -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 |
