1
Fork 0

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:
Alex Crichton 2018-04-26 06:56:37 -07:00
parent 84ce67ef95
commit a2a9cc68fe

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