From 6b9bdad3b68b12ff8e2075d54c1f7f005bb2f768 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 18 Mar 2021 15:02:39 +0200 Subject: Add noop mode to file cache, add --file-cache option to select --- build2/b.cxx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'build2/b.cxx') 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. // -- cgit v1.1