summaryrefslogtreecommitdiff
path: root/src/buildtool/main/build_utils.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-12-08 13:45:51 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-12-12 14:37:18 +0100
commit569d3e045efe7d15ecbf4331d093c83f48d3cc38 (patch)
treef0fb56537154c2ed8f01b706de0df0e3a2bf673c /src/buildtool/main/build_utils.cpp
parentc26ec6a240877717157ac76357e2ba2496fcd9d6 (diff)
downloadjustbuild-569d3e045efe7d15ecbf4331d093c83f48d3cc38.tar.gz
build_utils: Be specific in target cache entry store location...
...by specifying which TargetCache instance to use. This will allow 'just serve' to store target cache entries into the correct sharded location.
Diffstat (limited to 'src/buildtool/main/build_utils.cpp')
-rw-r--r--src/buildtool/main/build_utils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/buildtool/main/build_utils.cpp b/src/buildtool/main/build_utils.cpp
index 50557b71..2453e5e6 100644
--- a/src/buildtool/main/build_utils.cpp
+++ b/src/buildtool/main/build_utils.cpp
@@ -70,7 +70,8 @@ void WriteTargetCacheEntries(
std::size_t jobs,
gsl::not_null<IExecutionApi*> const& local_api,
gsl::not_null<IExecutionApi*> const& remote_api,
- TargetCacheWriteStrategy strategy) {
+ TargetCacheWriteStrategy strategy,
+ TargetCache<true> const& tc) {
if (strategy == TargetCacheWriteStrategy::Disable) {
return;
}
@@ -88,8 +89,7 @@ void WriteTargetCacheEntries(
};
for (auto const& [key, target] : cache_targets) {
if (auto entry = TargetCacheEntry::FromTarget(target, extra_infos)) {
- if (not Storage::Instance().TargetCache().Store(
- key, *entry, downloader)) {
+ if (not tc.Store(key, *entry, downloader)) {
Logger::Log(LogLevel::Warning,
"Failed writing target cache entry for {}",
key.Id().ToString());