about summary refs log tree commit diff
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-04-28 03:32:15 +0800
committerGitHub <noreply@github.com>2018-04-28 03:32:15 +0800
commit1c1fd2758e9da2c183d46f119a19ea119dbef0d9 (patch)
tree31ddd2b255949d74efd786b2db8e5d172691f541
parent4a961d1f082f53c9468a7bb363ac7fee3206a3a6 (diff)
parenta2a9cc68fe44a4a667dddd01c17b3dcceefb5a5a (diff)
downloadrust-1c1fd2758e9da2c183d46f119a19ea119dbef0d9.tar.gz
rust-1c1fd2758e9da2c183d46f119a19ea119dbef0d9.zip
Rollup merge of #50251 - alexcrichton:wasm-no-threads, r=eddyb
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.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/librustc_trans/back/linker.rs b/src/librustc_trans/back/linker.rs
index f9a8473464d..ea3f5b40860 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