1
Fork 0

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.
This commit is contained in:
kennytm 2018-04-28 03:32:15 +08:00 committed by GitHub
commit 1c1fd2758e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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