summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-12-06 15:20:44 +0100
committerMaksim Denisov <denisov.maksim@huawei.com>2024-12-09 13:01:58 +0100
commit344c00f1a63b628a0dff9335e106e005766c7d2f (patch)
tree1459dc2d530f3d02c901d2d5520f91e11506bcdb /src
parenta3b8c2dcf4948352ba62685c2cd82ec2bfc8896f (diff)
downloadjustbuild-344c00f1a63b628a0dff9335e106e005766c7d2f.tar.gz
Avoid writing to the CAS during bootstrapping
Diffstat (limited to 'src')
-rw-r--r--src/buildtool/build_engine/target_map/export.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/buildtool/build_engine/target_map/export.cpp b/src/buildtool/build_engine/target_map/export.cpp
index c6e5d740..3433ff4c 100644
--- a/src/buildtool/build_engine/target_map/export.cpp
+++ b/src/buildtool/build_engine/target_map/export.cpp
@@ -148,13 +148,16 @@ void ExportRule(
return;
}
context->statistics->IncrementExportsFoundCounter();
+
+ std::optional<TargetCacheKey> target_cache_key;
+#ifndef BOOTSTRAP_BUILD_TOOL
auto const& target_name = key.target.GetNamedTarget();
auto repo_key = context->repo_config->RepositoryKey(*context->storage,
target_name.repository);
- auto target_cache_key = repo_key
- ? context->storage->TargetCache().ComputeKey(
+ target_cache_key = repo_key ? context->storage->TargetCache().ComputeKey(
*repo_key, target_name, effective_config)
: std::nullopt;
+#endif
if (target_cache_key) {
// first try to get value from local target cache