From 9bd4975608755162e7cdf5e9074b49d1b8630b00 Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Wed, 28 Aug 2024 22:03:21 +0000 Subject: [PATCH] remove use of sequential flag --- .../tooling/nargo_cli/src/cli/compile_cmd.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/noir/noir-repo/tooling/nargo_cli/src/cli/compile_cmd.rs b/noir/noir-repo/tooling/nargo_cli/src/cli/compile_cmd.rs index 325641d0c5b..85faf574a0a 100644 --- a/noir/noir-repo/tooling/nargo_cli/src/cli/compile_cmd.rs +++ b/noir/noir-repo/tooling/nargo_cli/src/cli/compile_cmd.rs @@ -200,14 +200,11 @@ fn compile_programs( Ok(((), warnings)) }; - let program_results: Vec> = if compile_options.sequential { - binary_packages.iter().map(compile_package).collect() - } else { - // Configure a thread pool with a larger stack size to prevent overflowing stack in large programs. - // Default is 2MB. - let pool = rayon::ThreadPoolBuilder::new().stack_size(4 * 1024 * 1024).build().unwrap(); - pool.install(|| binary_packages.par_iter().map(compile_package).collect()) - }; + // Configure a thread pool with a larger stack size to prevent overflowing stack in large programs. + // Default is 2MB. + let pool = rayon::ThreadPoolBuilder::new().stack_size(4 * 1024 * 1024).build().unwrap(); + let program_results: Vec> = + pool.install(|| binary_packages.par_iter().map(compile_package).collect()); // Collate any warnings/errors which were encountered during compilation. collect_errors(program_results).map(|(_, warnings)| ((), warnings))