From 5d615c7ae1761d1511e01d0b4bea4920fda190a7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 12 Feb 2018 18:34:31 +0200 Subject: Add default capping of stack size for all POSIX platforms, --max-stack --- build2/b.cli | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'build2/b.cli') diff --git a/build2/b.cli b/build2/b.cli index e7f06cb..6114763 100644 --- a/build2/b.cli +++ b/build2/b.cli @@ -435,6 +435,21 @@ namespace build2 details." } + size_t --max-stack + { + "", + "The maximum stack size in KBytes to allow for newly created threads. + For \i{pthreads}-based systems the driver queries the stack size of + the main thread and uses the same size for creating additional threads. + This allows adjusting the stack size using familiar mechanisms, such + as \cb{ulimit}. Sometimes, however, the stack size of the main thread + is excessively large. As a result, the driver checks if it is greater + than a predefined limit (64MB on 64-bit systems and 32MB on 32-bit + ones) and caps it to a more sensible value (8MB) if that's the case. + This option allows you to override this check with the special zero + value indicating that the main thread stack size should be used as is." + } + bool --serial-stop|-s { "Run serially and stop at the first error. This mode is useful to -- cgit v1.1