summaryrefslogtreecommitdiff
path: root/src/buildtool/main/build_utils.hpp
diff options
context:
space:
mode:
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