aboutsummaryrefslogtreecommitdiff
path: root/build2/b.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.cxx
parent562af3a7f3742bf57b007e904e0bb661a5da1dab (diff)
Add noop mode to file cache, add --file-cache option to select
Diffstat (limited to 'build2/b.cxx')
-rw-r--r--build2/b.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/build2/b.cxx b/build2/b.cxx
index 81520bb..1ba15e2 100644
--- a/build2/b.cxx
+++ b/build2/b.cxx
@@ -762,7 +762,18 @@ main (int argc, char* argv[])
: nullopt));
global_mutexes mutexes (sched.shard_size ());
- file_cache fcache (sched);
+
+ bool fcache_comp (true);
+ if (ops.file_cache_specified ())
+ {
+ const string& v (ops.file_cache ());
+ if (v == "noop" || v == "none")
+ fcache_comp = false;
+ else if (v != "sync-lz4")
+ fail << "invalid --file-cache value '" << v << "'";
+ }
+
+ file_cache fcache (fcache_comp);
// Trace some overall environment information.
//