From db64f60b1d7469806b90010e2d17f500630a53fa Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Mon, 3 Dec 2018 17:38:04 +0100 Subject: [PATCH] Bump stack size to 32MB --- src/librustc_driver/driver.rs | 2 +- src/librustc_driver/lib.rs | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/librustc_driver/driver.rs b/src/librustc_driver/driver.rs index c1705ad2d58..777cc09b8b1 100644 --- a/src/librustc_driver/driver.rs +++ b/src/librustc_driver/driver.rs @@ -91,7 +91,7 @@ pub fn spawn_thread_pool R + sync::Send, R: sync:: let config = ThreadPoolBuilder::new() .num_threads(Session::query_threads_from_opts(&opts)) .deadlock_handler(|| unsafe { ty::query::handle_deadlock() }) - .stack_size(16 * 1024 * 1024); + .stack_size(::STACK_SIZE); let with_pool = move |pool: &ThreadPool| { pool.install(move || f(opts)) diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index 42576dcae64..061c19eca36 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -1468,6 +1468,11 @@ fn parse_crate_attrs<'a>(sess: &'a Session, input: &Input) -> PResult<'a, Vec(name: String, f: F) -> Result R + Send + 'static, R: Send + 'static, { - // Temporarily have stack size set to 16MB to deal with nom-using crates failing - const STACK_SIZE: usize = 16 * 1024 * 1024; // 16MB - #[cfg(all(unix, not(target_os = "haiku")))] let spawn_thread = unsafe { // Fetch the current resource limits