summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtool/execution_api/common')
-rw-r--r--src/buildtool/execution_api/common/TARGETS1
-rw-r--r--src/buildtool/execution_api/common/api_bundle.cpp6
-rw-r--r--src/buildtool/execution_api/common/execution_api.hpp3
3 files changed, 8 insertions, 2 deletions
diff --git a/src/buildtool/execution_api/common/TARGETS b/src/buildtool/execution_api/common/TARGETS
index 3ffd508f..b13ac8b5 100644
--- a/src/buildtool/execution_api/common/TARGETS
+++ b/src/buildtool/execution_api/common/TARGETS
@@ -23,6 +23,7 @@
, ["src/buildtool/file_system", "object_type"]
, ["src/buildtool/logging", "logging"]
, ["src/utils/cpp", "expected"]
+ , ["src/utils/cpp", "tmp_dir"]
]
, "private-deps":
[ ["@", "json", "", "json"]
diff --git a/src/buildtool/execution_api/common/api_bundle.cpp b/src/buildtool/execution_api/common/api_bundle.cpp
index 7ab06e81..391e1343 100644
--- a/src/buildtool/execution_api/common/api_bundle.cpp
+++ b/src/buildtool/execution_api/common/api_bundle.cpp
@@ -43,7 +43,8 @@ auto ApiBundle::Create(
remote_context->auth,
remote_context->retry_config,
config,
- local_context->storage_config->hash_function);
+ local_context->storage_config->hash_function,
+ local_api->GetTempSpace());
}
return ApiBundle{.local = std::move(local_api),
.remote = std::move(remote_api)};
@@ -63,7 +64,8 @@ auto ApiBundle::MakeRemote(
authentication,
retry_config,
config,
- HashFunction{local->GetHashType()});
+ HashFunction{local->GetHashType()},
+ local->GetTempSpace());
}
return local;
}
diff --git a/src/buildtool/execution_api/common/execution_api.hpp b/src/buildtool/execution_api/common/execution_api.hpp
index 43a7e581..001c9189 100644
--- a/src/buildtool/execution_api/common/execution_api.hpp
+++ b/src/buildtool/execution_api/common/execution_api.hpp
@@ -30,6 +30,7 @@
#include "src/buildtool/crypto/hash_function.hpp"
#include "src/buildtool/execution_api/common/execution_action.hpp"
#include "src/buildtool/execution_engine/dag/dag.hpp"
+#include "src/utils/cpp/tmp_dir.hpp"
/// \brief Abstract remote execution API
/// Can be used to create actions.
@@ -156,6 +157,8 @@ class IExecutionApi {
[[nodiscard]] virtual auto GetHashType() const noexcept
-> HashFunction::Type = 0;
+
+ [[nodiscard]] virtual auto GetTempSpace() const noexcept -> TmpDir::Ptr = 0;
};
#endif // INCLUDED_SRC_BUILDTOOL_EXECUTION_API_COMMON_EXECUTION_APIHPP