about summary refs log tree commit diff
path: root/src/rustc
diff options
context:
space:
mode:
authorTatsuyuki Ishi <ishitatsuyuki@gmail.com>2018-03-06 13:33:36 +0900
committerTatsuyuki Ishi <ishitatsuyuki@gmail.com>2018-03-18 23:05:28 +0900
commit1bb89f1b3cf1e4b5fa83391872136251c0030c1e (patch)
tree88d00427c4fa0f461c29d92c105f1883a4d05cda /src/rustc
parente85c9227c2e913b71f0d7b6cc2322d7897f28554 (diff)
rustc_driver: get rid of extra thread on Windows
Diffstat (limited to 'src/rustc')
-rw-r--r--src/rustc/rustc.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/rustc/rustc.rs b/src/rustc/rustc.rs
index bfd01146d2c..bd36aaf01f8 100644
--- a/src/rustc/rustc.rs
+++ b/src/rustc/rustc.rs
@@ -9,6 +9,15 @@
 // except according to those terms.
 
 #![feature(rustc_private)]
+#![feature(link_args)]
+
+// Set the stack size at link time on Windows. See rustc_driver::in_rustc_thread
+// for the rationale.
+#[cfg_attr(all(windows, target_env = "msvc"), link_args = "/STACK:16777216")]
+// We only build for msvc and gnu now, but we use a exhaustive condition here
+// so we can expect either the stack size to be set or the build fails.
+#[cfg_attr(all(windows, not(target_env = "msvc")), link_args = "-Wl,--stack,16777216")]
+extern {}
 
 extern crate rustc_driver;