aboutsummaryrefslogtreecommitdiff
path: root/build2/b.cli
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-02-12 18:34:31 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-02-12 18:34:31 +0200
commit5d615c7ae1761d1511e01d0b4bea4920fda190a7 (patch)
tree4eb34289cc59ed54765ea6ad6323617944efc2d0 /build2/b.cli
parentf5bc31da2a84b81fef5da8a59da66a2386adbea6 (diff)
Add default capping of stack size for all POSIX platforms, --max-stack
Diffstat (limited to 'build2/b.cli')
-rw-r--r--build2/b.cli15
1 files changed, 15 insertions, 0 deletions
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
+ {
+ "<num>",
+ "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