From 4402929b8956561255754bc610734a84974e997f Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Tue, 5 Dec 2023 12:03:06 +0100 Subject: target-cache writing: support different strategies --- src/buildtool/main/build_utils.hpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/buildtool/main/build_utils.hpp') 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 const& cache_targets) -> std::vector; +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 const& cache_targets, @@ -45,7 +52,8 @@ void WriteTargetCacheEntries( extra_infos, std::size_t jobs, gsl::not_null const& local_api, - gsl::not_null const& remote_api); + gsl::not_null const& remote_api, + TargetCacheWriteStrategy strategy = TargetCacheWriteStrategy::Sync); #endif // BOOTSTRAP_BUILD_TOOL #endif // INCLUDED_SRC_BUILDOOL_MAIN_BUILD_UTILS_HPP -- cgit v1.2.3