aboutsummaryrefslogtreecommitdiff
path: root/build2/b-options.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-03-18 15:02:39 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-03-18 15:02:39 +0200
commit6b9bdad3b68b12ff8e2075d54c1f7f005bb2f768 (patch)
tree8ccd47c832ea6fd8dea6d12e3b9f36c8c0e72033 /build2/b-options.cxx
parent562af3a7f3742bf57b007e904e0bb661a5da1dab (diff)
Add noop mode to file cache, add --file-cache option to select
Diffstat (limited to 'build2/b-options.cxx')
-rw-r--r--build2/b-options.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/build2/b-options.cxx b/build2/b-options.cxx
index c061fef..17b791e 100644
--- a/build2/b-options.cxx
+++ b/build2/b-options.cxx
@@ -709,6 +709,8 @@ namespace build2
max_jobs_specified_ (false),
queue_depth_ (4),
queue_depth_specified_ (false),
+ file_cache_ (),
+ file_cache_specified_ (false),
max_stack_ (),
max_stack_specified_ (false),
serial_stop_ (),
@@ -892,6 +894,13 @@ namespace build2
this->queue_depth_specified_ = true;
}
+ if (a.file_cache_specified_)
+ {
+ ::build2::cl::parser< string>::merge (
+ this->file_cache_, a.file_cache_);
+ this->file_cache_specified_ = true;
+ }
+
if (a.max_stack_specified_)
{
::build2::cl::parser< size_t>::merge (
@@ -1105,6 +1114,14 @@ namespace build2
<< " the build system scheduler implementation for details." << ::std::endl;
os << std::endl
+ << "\033[1m--file-cache\033[0m \033[4mimpl\033[0m File cache implementation to use for intermediate build" << ::std::endl
+ << " results. Valid values are \033[1mnoop\033[0m (no caching or" << ::std::endl
+ << " compression) and \033[1msync-lz4\033[0m (no caching with synchronous" << ::std::endl
+ << " LZ4 on-disk compression). If this option is not" << ::std::endl
+ << " specified, then a suitable default implementation is used" << ::std::endl
+ << " (currently \033[1msync-lz4\033[0m)." << ::std::endl;
+
+ os << std::endl
<< "\033[1m--max-stack\033[0m \033[4mnum\033[0m The maximum stack size in KBytes to allow for newly" << ::std::endl
<< " created threads. For \033[4mpthreads\033[0m-based systems the driver" << ::std::endl
<< " queries the stack size of the main thread and uses the" << ::std::endl
@@ -1311,6 +1328,9 @@ namespace build2
_cli_options_map_["-Q"] =
&::build2::cl::thunk< options, size_t, &options::queue_depth_,
&options::queue_depth_specified_ >;
+ _cli_options_map_["--file-cache"] =
+ &::build2::cl::thunk< options, string, &options::file_cache_,
+ &options::file_cache_specified_ >;
_cli_options_map_["--max-stack"] =
&::build2::cl::thunk< options, size_t, &options::max_stack_,
&options::max_stack_specified_ >;