summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/buildtool/execution_api/local/local_action.cpp2
-rw-r--r--src/buildtool/storage/config.hpp7
2 files changed, 8 insertions, 1 deletions
diff --git a/src/buildtool/execution_api/local/local_action.cpp b/src/buildtool/execution_api/local/local_action.cpp
index 764c00aa..e2fe1199 100644
--- a/src/buildtool/execution_api/local/local_action.cpp
+++ b/src/buildtool/execution_api/local/local_action.cpp
@@ -115,7 +115,7 @@ auto LocalAction::Execute(Logger const* logger) noexcept
auto LocalAction::Run(bazel_re::Digest const& action_id) const noexcept
-> std::optional<Output> {
auto exec_path =
- CreateUniquePath(StorageConfig::BuildRoot() / "exec_root" /
+ CreateUniquePath(StorageConfig::ExecutionRoot() /
NativeSupport::Unprefix(action_id.hash()));
if (not exec_path) {
diff --git a/src/buildtool/storage/config.hpp b/src/buildtool/storage/config.hpp
index d231f06a..dd569c46 100644
--- a/src/buildtool/storage/config.hpp
+++ b/src/buildtool/storage/config.hpp
@@ -155,6 +155,13 @@ class StorageConfig {
}
}
+ /// \brief Root directory for local action executions; individual actions
+ /// create a working directory below this root.
+ [[nodiscard]] static auto ExecutionRoot() noexcept
+ -> std::filesystem::path {
+ return GenerationCacheRoot(0) / "exec_root";
+ }
+
private:
[[nodiscard]] static auto Data() noexcept -> ConfigData& {
static ConfigData instance{};