diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/buildtool/execution_api/local/local_action.hpp | 3 | ||||
-rw-r--r-- | src/buildtool/execution_api/local/local_api.hpp | 5 | ||||
-rw-r--r-- | src/buildtool/execution_api/local/local_response.hpp | 8 |
3 files changed, 7 insertions, 9 deletions
diff --git a/src/buildtool/execution_api/local/local_action.hpp b/src/buildtool/execution_api/local/local_action.hpp index 4e377c39..47e4e5a4 100644 --- a/src/buildtool/execution_api/local/local_action.hpp +++ b/src/buildtool/execution_api/local/local_action.hpp @@ -25,7 +25,6 @@ #include <vector> #include "gsl/gsl" -#include "src/buildtool/crypto/hash_function.hpp" #include "src/buildtool/execution_api/bazel_msg/bazel_msg_factory.hpp" #include "src/buildtool/execution_api/common/execution_action.hpp" #include "src/buildtool/execution_api/common/execution_response.hpp" @@ -114,7 +113,7 @@ class LocalAction final : public IExecutionAction { .env_vars = &env_vars, .properties = &properties_, .exec_dir = &exec_dir, - .hash_function = HashFunction::Instance(), + .hash_function = storage_config_.hash_function, .timeout = timeout_, .skip_action_cache = do_not_cache}; return BazelMsgFactory::CreateActionDigestFromCommandLine(request); diff --git a/src/buildtool/execution_api/local/local_api.hpp b/src/buildtool/execution_api/local/local_api.hpp index e8ba0831..b407297d 100644 --- a/src/buildtool/execution_api/local/local_api.hpp +++ b/src/buildtool/execution_api/local/local_api.hpp @@ -34,7 +34,6 @@ #include "src/buildtool/common/repository_config.hpp" #include "src/buildtool/compatibility/compatibility.hpp" #include "src/buildtool/compatibility/native_support.hpp" -#include "src/buildtool/crypto/hash_function.hpp" #include "src/buildtool/execution_api/bazel_msg/bazel_blob_container.hpp" #include "src/buildtool/execution_api/common/artifact_blob_container.hpp" #include "src/buildtool/execution_api/common/blob_tree.hpp" @@ -216,9 +215,9 @@ class LocalApi final : public IExecutionApi { ArtifactDigest digest = IsTreeObject(info.type) ? ArtifactDigest::Create<ObjectType::Tree>( - HashFunction::Instance(), *content) + storage_config_.hash_function, *content) : ArtifactDigest::Create<ObjectType::File>( - HashFunction::Instance(), *content); + storage_config_.hash_function, *content); // Collect blob and upload to remote CAS if transfer size reached. if (not UpdateContainerAndUpload<ArtifactDigest>( diff --git a/src/buildtool/execution_api/local/local_response.hpp b/src/buildtool/execution_api/local/local_response.hpp index c6214320..d0ad27bd 100644 --- a/src/buildtool/execution_api/local/local_response.hpp +++ b/src/buildtool/execution_api/local/local_response.hpp @@ -140,7 +140,7 @@ class LocalResponse final : public IExecutionResponse { link.path(), Artifact::ObjectInfo{ .digest = ArtifactDigest::Create<ObjectType::File>( - HashFunction::Instance(), link.target()), + storage_.GetHashFunction(), link.target()), .type = ObjectType::Symlink}); } catch (...) { return false; @@ -152,7 +152,7 @@ class LocalResponse final : public IExecutionResponse { link.path(), Artifact::ObjectInfo{ .digest = ArtifactDigest::Create<ObjectType::File>( - HashFunction::Instance(), link.target()), + storage_.GetHashFunction(), link.target()), .type = ObjectType::Symlink}); dir_symlinks.emplace(link.path()); // add it to set } catch (...) { @@ -167,7 +167,7 @@ class LocalResponse final : public IExecutionResponse { link.path(), Artifact::ObjectInfo{ .digest = ArtifactDigest::Create<ObjectType::File>( - HashFunction::Instance(), link.target()), + storage_.GetHashFunction(), link.target()), .type = ObjectType::Symlink}); } catch (...) { return false; @@ -179,7 +179,7 @@ class LocalResponse final : public IExecutionResponse { link.path(), Artifact::ObjectInfo{ .digest = ArtifactDigest::Create<ObjectType::File>( - HashFunction::Instance(), link.target()), + storage_.GetHashFunction(), link.target()), .type = ObjectType::Symlink}); } catch (...) { return false; |