diff options
| author | kennytm <kennytm@gmail.com> | 2018-04-28 03:32:15 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-04-28 03:32:15 +0800 |
| commit | 1c1fd2758e9da2c183d46f119a19ea119dbef0d9 (patch) | |
| tree | 31ddd2b255949d74efd786b2db8e5d172691f541 | |
| parent | 4a961d1f082f53c9468a7bb363ac7fee3206a3a6 (diff) | |
| parent | a2a9cc68fe44a4a667dddd01c17b3dcceefb5a5a (diff) | |
| download | rust-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.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 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 |
