summaryrefslogtreecommitdiff
path: root/src/buildtool/main/build_utils.hpp
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2023-12-05 12:03:06 +0100
committerKlaus Aehlig <klaus.aehlig@huawei.com>2023-12-05 12:46:57 +0100
commit4402929b8956561255754bc610734a84974e997f (patch)
treee7acfef122866a2615def266f92d6c53a0485f1b /src/buildtool/main/build_utils.hpp
parent9bfc824e8d3cba73a3f3aaf88bb401a7211967f3 (diff)
downloadjustbuild-4402929b8956561255754bc610734a84974e997f.tar.gz
target-cache writing: support different strategies
Diffstat (limited to 'src/buildtool/main/build_utils.hpp')
-rw-r--r--src/buildtool/main/build_utils.hpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/buildtool/main/build_utils.hpp b/src/buildtool/main/build_utils.hpp
index 2db29839..e78d86d0 100644
--- a/src/buildtool/main/build_utils.hpp
+++ b/src/buildtool/main/build_utils.hpp
@@ -38,6 +38,13 @@
std::unordered_map<TargetCacheKey, AnalysedTargetPtr> const& cache_targets)
-> std::vector<ArtifactDescription>;
+enum class TargetCacheWriteStrategy {
+ Disable, ///< Do not create target-level cache entries
+ Sync, ///< Create target-level cache entries after syncing the artifacts
+ Split ///< Create target-level cache entries after syncing the artifacts;
+ ///< during artifact sync try to use blob splitting, if available
+};
+
#ifndef BOOTSTRAP_BUILD_TOOL
void WriteTargetCacheEntries(
std::unordered_map<TargetCacheKey, AnalysedTargetPtr> const& cache_targets,
@@ -45,7 +52,8 @@ void WriteTargetCacheEntries(
extra_infos,
std::size_t jobs,
gsl::not_null<IExecutionApi*> const& local_api,
- gsl::not_null<IExecutionApi*> const& remote_api);
+ gsl::not_null<IExecutionApi*> const& remote_api,
+ TargetCacheWriteStrategy strategy = TargetCacheWriteStrategy::Sync);
#endif // BOOTSTRAP_BUILD_TOOL
#endif // INCLUDED_SRC_BUILDOOL_MAIN_BUILD_UTILS_HPP